embedded

basic requirements to be called RTOS for 8051

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-04 13:06:22
问题 I want to make an RTOS for 8051 and very confused as what minimum requirements should be followed to make an OS in 8051 as 8051 has very limitted resources in case of RAM and ROM. It is just and assignment type problem but i am really confused as we make softwares for 8051 are they not an OS? which features differenciate a normal regular coding of micro controller from RTOS? please help thanks 回答1: An typical RTOS provides at least the following: Deterministic task scheduling Task

basic requirements to be called RTOS for 8051

核能气质少年 提交于 2020-01-04 13:06:15
问题 I want to make an RTOS for 8051 and very confused as what minimum requirements should be followed to make an OS in 8051 as 8051 has very limitted resources in case of RAM and ROM. It is just and assignment type problem but i am really confused as we make softwares for 8051 are they not an OS? which features differenciate a normal regular coding of micro controller from RTOS? please help thanks 回答1: An typical RTOS provides at least the following: Deterministic task scheduling Task

What is the most general approach to place a structure into the flash (microcontrollers)

僤鯓⒐⒋嵵緔 提交于 2020-01-04 05:51:08
问题 I am working on an embedded C project using GCC for ARM V-4.8.3 toolchain. I have an array of look-up structures that are read only during the life cycle of the entire program. Since I am running out of RAM (and have plenty of Flash unused) it is better idea to push them into the flash, which will not affect the function of the program. The problem is how. One way to do so is using the variable __attribute__ ((section ("TEXT"))) provided by GCC. In this case my code is compiler dependent. If

How to access current cargo profile (debug/release, …) from the build script (build.rs)

五迷三道 提交于 2020-01-04 05:21:13
问题 In an embedded project, I usually run the debug mode with qemu, but need to build the release for a concrete microcontroller. The build.rs would need to know what the actual mode is (debug or release) to generate the correct memory layout. How can the build.rs make this decision? Related: How to access current cargo profile (build, test, bench, doc, ....) from the build script (build.rs) 回答1: It's written in the doc: PROFILE - "release" for release builds, "debug" for other builds. fn main()

How can I plant assembly instructions in the prologue and epilogue of function via gcc

寵の児 提交于 2020-01-04 04:18:10
问题 I try to build profiler to some c project. I want that gcc plant some assembly instruction in all the function entries and function exit points in compile time. I try to search some guides in the web but without success. where can I learn how to do that? thank in advance. 回答1: Apparently you can use the -finstrument-functions flag to get gcc to generate instrumentation calls void __cyg_profile_func_enter(void *func, void *callsite); void __cyg_profile_func_exit(void *func, void *callsite); at

Serving static html files using DefaultServlet on embedded Jetty

安稳与你 提交于 2020-01-04 04:13:54
问题 I'm working on a project that needs to be self contained so I've decided to embed Jetty in my app. I'm gonna be serving static HTML pages, a few JSP pages, and also will be using some custom servlets. I've found a perfect example of how to setup the embedded Jetty to accomplish all of this (http://thinking.awirtz.com/2011/11/03/embedded-jetty-servlets-and-jsp/), however, since this is the first time I'll be using Jetty and working with JSP pages or servlets, I've got a few basic questions.

USB 24bits audiostream descriptors

送分小仙女□ 提交于 2020-01-04 03:51:25
问题 I am working on a demo for an USB headset and I have a question about the audio endpoint descriptors of the USB. I have a working 8-48kHz 16bit audio stream and I can select any sample frequency in the windows properties of an audio device. I use the following descriptors: Code: // Interface 2: Speaker, alternate setting 1. Type 1 format descriptor. static const UsbAudioStreamingType1DescriptorType UsbIfd2Format = { sizeof(UsbAudioStreamingType1DescriptorType), // uint8 bLength; UDESC_CS

How can a task wait on multiple vxworks Queues?

点点圈 提交于 2020-01-04 02:49:09
问题 We have a vxWorks design which requires one task to process both high and low priority messages sent over two message queues. The messages for a given priority have to be processed in FIFO order. For example, process all the high priority messages in the order they were received, then process the low priority messages. If there is no high priority message, then process the low priority message immediately. Is there a way to do this? 回答1: If you use named pipes (pipeDevCreate(), write(), read(

Does using global variables increase or decrease performance, in C code compiled for ARM7?

爱⌒轻易说出口 提交于 2020-01-03 21:07:09
问题 Does using lots of global variables in C code decrease or increase performance, when compiled for an ARM7 embedded platform? The code base consists of multiple C source code files which refer each other's global variables using the extern keyword. Different functions from different source code files refer to different global variables. Some of the variables are arrays. The compiler I'm using is IAR's EW ARM kickstart edition (32kb). 回答1: This will always decrease performance and increase

Segment Fault caused by using new or malloc on embedded device [closed]

僤鯓⒐⒋嵵緔 提交于 2020-01-03 19:04:00
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 6 years ago . I am trying to build my application with C++ instead of C for my MIPS based embedded device . First, I had a link problem that you can see here. This