embedded

Is it possible to fake a file stream, such as stdin, in C?

家住魔仙堡 提交于 2020-01-03 15:37:17
问题 I am working on an embedded system with no filesystem and I need to execute programs that take input data from files specified via command like arguments or directly from stdin. I know it is possible to bake-in the file data with the binary using the method from this answer: C/C++ with GCC: Statically add resource files to executable/library but currently I would need to rewrite all the programs to access the data in a new way. Is it possible to bake-in a text file, for example, and access it

tail-chaining of Interrupts

杀马特。学长 韩版系。学妹 提交于 2020-01-03 09:07:28
问题 what is tail chaining of Interrupts which is supported by NVIC in ARM Cortex M3. 回答1: Tail-chaining is back-to-back processing of exceptions without the overhead of state saving and restoration between interrupts. The processor skips the pop of eight registers and push of eight registers when exiting one ISR and entering another because this has no effect on the stack contents. Cortex™-M3 Technical Reference Manual Which basically means, handling pending interrupts without repeating the

Are there any FreeRTOS interpreted language libraries available?

怎甘沉沦 提交于 2020-01-03 07:19:10
问题 I work for a company that created firmware for several device using FreeRTOS. Lately our request for new features has surpassed how much work our firmware engineers are capable of, but we can't afford to hire anyone new right now either. Making even tiny changes requires firmware people to go in and modify things at a very low level. I've been looking for some sort of interpreted language project for FreeRTOS that would let us implement new features at a higher level. Ideally I would like to

Misra standard for embedded software

情到浓时终转凉″ 提交于 2020-01-03 07:19:09
问题 I have a requirement to make a large amount of code MISRA compliant. First question: Can somebody to give an estimation for passing well written code for embedded system based on experience. I understand that "well written" is poorly defined and vague so i ask for raw estimation. Second question: Any recommendation for tool that can be customizable (i.e allowing suppress specific warnings) and used in automatic build environment (i.e command line interface) Any other useful suggestions that

Are there any FreeRTOS interpreted language libraries available?

无人久伴 提交于 2020-01-03 07:19:05
问题 I work for a company that created firmware for several device using FreeRTOS. Lately our request for new features has surpassed how much work our firmware engineers are capable of, but we can't afford to hire anyone new right now either. Making even tiny changes requires firmware people to go in and modify things at a very low level. I've been looking for some sort of interpreted language project for FreeRTOS that would let us implement new features at a higher level. Ideally I would like to

Building Robert Nelson's Linux kernel into Yocto(daisy) for beaglebone black

◇◆丶佛笑我妖孽 提交于 2020-01-03 03:04:56
问题 I was trying to build Linux for beaglebone black from official repository https://github.com/beagleboard/linux I am able to fetch and run menuconfig but when i try to compile the kernel i get error. Following is the content of the recipe file. File name : linux-yocto-chipsee_3.14.bb path : /home/ankur/yocto_daisy/poky/meta-ybdevelop/recipes-example/linux inherit kernel require recipes-kernel/linux/linux-yocto.inc BRANCH = "3.14" # Override SRC_URI in a bbappend file to point at a different

Debouncing a limit switch in Arduino ISR with delays

雨燕双飞 提交于 2020-01-02 23:07:11
问题 I have a limit switch attached to an arduino Mega 2650 for motion control. The limit switch's two Normally Open contacts are connected to an Arduino Pin and ground, such that when the Limit Switch is engaged, the Arduino Pin gets short circuited to ground. As expected, I have bouncing issues with this setup. I confirmed it using counters in my ISRs. Finally, I wrote the following code that seems to reliably identify whether my limit switch is engaged or disengaged at any given point in time.

How to write a CanOpen stack?

久未见 提交于 2020-01-02 20:03:28
问题 I have a similar problem with this. How to program a simple CANopen layer . I read the answers but I have to program a CANopen layer on my own I cannot get a commercial one. So are there any basics of writing a CANopen stack (or layer I'm not certain about the difference)? I don't know even where to start.. If it's required here's some information : My master device is a beagle bone black with QNX. QNX has a generic CAN library I think but not specific to CANopen. And my slave is a

Interrupt-safe way to set function pointer in HiTech C on PIC32

瘦欲@ 提交于 2020-01-02 10:37:11
问题 I have an ISR defined to trigger on an external interrupt. The external interrupt may not always be enabled, but under certain circumstances I want to be able to register a function to be called ONCE within the interrupt from within the main code. The function might be replaced by another one, or removed, before the next interrupt. I don't know much about techniques for synchronisation on the PIC32, but I've come up with the following: volatile BOOL callbackInterrupted = FALSE; volatile BOOL

Download control board software simulators

北城余情 提交于 2020-01-02 08:15:12
问题 I am interested in learning how to do embedded system programming in c. However, I will need some hardware. I am wondering is there any software that can simulate what the control board will do? The control board is listed in the following tutorial http://www.learn-c.com/hardware.htm Many thanks for any advice 回答1: The board you linked to is not an embedded system board, it is an I/O interface for a PC. If you want to simulate that, you can simply write PC code stubs for the I/O functions