embedded

STM32 how to get last reset status

北慕城南 提交于 2020-01-01 05:47:25
问题 I'm working with STM32F427 and I'd like to get cause of last reset. There is RCC clock control & status register RCC_CSR with many reset flags, but I'm not able to get any meaningful value. By reading the value of that register, I get only 0x03, which means LSI ready and LSI ON, but no flags about reset are set if I try power on, software reset, low voltage etc. I found snippet of code for getting reset flags like below, but all the flags are still 0. if (RCC_GetFlagStatus(RCC_FLAG_SFTRST)) .

How can you do C++ when your embedded compiler doesn't have operator new or STL support?

≯℡__Kan透↙ 提交于 2020-01-01 05:35:09
问题 I am working on a group senior project for my university and I have run into a major hurdle in trying to get my code to work. The compiler that we have for our 8 bit Atmel microcontroller does not support the new or delete operators, and it does not support the C++ STL. I could program it in C, but I have to implement an A* algorithm which I have never done before. While I have tried C initially I soon realized that I never did pure C before. Trying to model objects with structs and functions

What are .axf files?

有些话、适合烂在心里 提交于 2019-12-31 19:29:22
问题 I am new to arm architecture, I work on embedded software and was trying to learn about the .axf file which is present in my project binary's debug folder. Discovered that it is an arm executable format file generated by linker while the build process and it is used in debugging the crashes. So it is obvious that it contains some debugging information but its not clear what kind of information that is? And also there exists one .map file in the debug folder, so what could be the difference

Use a html renderer in an embedded environment [closed]

99封情书 提交于 2019-12-31 08:29:33
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm working on a project where I will design a GUI for an embedded device and would love to go with HTML for this. I hope you guys can

Use a html renderer in an embedded environment [closed]

独自空忆成欢 提交于 2019-12-31 08:29:24
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm working on a project where I will design a GUI for an embedded device and would love to go with HTML for this. I hope you guys can

How to use va_list correctly in a sequence of wrapper functions calls?

放肆的年华 提交于 2019-12-31 07:29:11
问题 I have an ethernet library for microcontroller (keil rl-tcpnet for lpc2478). Library uses va_list (standard pointer to arg array macro defined in stdarg.h) in debug output function in such a way: void __debug__ (const char *fmt, ...) { va_list args; va_start (args,fmt); vprintf (fmt,args); va_end (args); } However vprintf sends data to incorrect stream and I need to redirect debug output of library to correct serial port. Library has .c cofigure files and I write c++ code so I use wrapper

Undefined reference to `kill'

最后都变了- 提交于 2019-12-30 23:05:54
问题 I developed an application for an ARM7 embedded system in C. Now I want to compile and link it with C++ in order to use some C++ features. To do this, I am using mipsel-elf-g++ instead of mipsel-elf-gcc . I can compile my code with mipsel-elf-g++ successfully, but in linking step I get the errors: /opt/mipsel/lib/gcc/mipsel-elf/3.4.6/../../../../mipsel-elf/lib/libc.a(lib_a-abort.o): In function ```abort': /cygdrive/d/Files/cross/mips/newlib-1.15.0/newlib/libc/stdlib/abort.c:63: undefined

Undefined reference to `kill'

落爺英雄遲暮 提交于 2019-12-30 23:03:54
问题 I developed an application for an ARM7 embedded system in C. Now I want to compile and link it with C++ in order to use some C++ features. To do this, I am using mipsel-elf-g++ instead of mipsel-elf-gcc . I can compile my code with mipsel-elf-g++ successfully, but in linking step I get the errors: /opt/mipsel/lib/gcc/mipsel-elf/3.4.6/../../../../mipsel-elf/lib/libc.a(lib_a-abort.o): In function ```abort': /cygdrive/d/Files/cross/mips/newlib-1.15.0/newlib/libc/stdlib/abort.c:63: undefined

Safely detect, if function is called from an ISR?

感情迁移 提交于 2019-12-30 16:25:09
问题 I'm developing software for an ARM Cortex M3 (NXP LPC1769) microncontroller. At the moment I'm searching for a mechansim to detect if my function is called within an ISR. I asume that I have to check a register. Based on this information I would like to call difficult functions. I already checked the reference manual, if there is a register containing the necessary information. For example I tried to detect if I'm called from an ISR (I used SysTick-ISR) based on the "Interrupt Active Bit

llvm optimizes with library functions

女生的网名这么多〃 提交于 2019-12-30 09:51:53
问题 Starting with code like this void lib_memset( unsigned char *dest, unsigned char c, unsigned int n) { while(n--) { *dest=c; dest++; } } using llvm as a cross compiler clang -Wall -m32 -emit-llvm -fno-builtin --target=arm-none-eabi -c lib_memset.c -o lib_memset.bc opt -std-compile-opts -strip-debug -march=arm -mcpu=mpcore -mtriple=arm-none-eabi lib_memset.bc -o lib_memset.opt.bc llc -march=arm -mcpu=mpcore -disable-simplify-libcalls lib_memset.opt.bc -o lib_memset.opt.s llc -march=arm -mcpu