Human-in-the-Loop Cyber-Physical Systems (HiLCPS) offers assistive technology that augments human interaction with the physical world, such as self-feeding, communication and mobility for functionally locked-in individuals. HiLCPS applications are typically implemented as networked embedded systems interfacing both human and the physical environment. Developing HiLCPS applications is challenging due to interfacing with hardware with different specifications and physical location (local/remote). Also, while algorithm designers prototype applications in MATLAB benefiting from an algorithm design environment, the gap from prototyping MATLAB application to embedded solution traditionally requires significant manual implementation. In this paper, we propose a HiLCPS Framework for the rapid development of embedded HiLCPS applications. The framework groups similar hardware types to classes, unifying their access and with this offering both hardware and location transparent access. The framework furthermore incorporates a domain-specific synthesis tool, called HSyn. HSyn empowers algorithm designers to prototype a portable, hardware-agnostic application in MATLAB while offering an automatic path to embedded deployment without requiring embedded knowledge. We demonstrate the benefit of the framework with a brain-controlled wheelchair application prototyped in MATLAB that transparently accesses a variety of EEG acquisition systems with local or remote connections. Then, by using HSyn, the application is automatically deployed to a BeagleBone Black equipped with a custom-designed electrophysiological acquisition cape. HSyn shows six orders of magnitude of productivity gain compared to manual embedded deployment. The wheelchair performs stepwise navigated based on human intent inference with 91% accuracy at 0.9 confidence threshold every 4 seconds on average over 9 users.