Abstract

This chapter discusses various aspects of GNU C Compiler for developing software for Cortex-M0 microcontrollers. The GNU tool chain contains the C compiler, assembler, linker, libraries, debugger, and additional utilities. It is found that the linker script is tool chain specific because the symbol names being used are tool chain specific. It is observed that by creating a disassembly listing of the compiled program image, we can use the stacked program counter value to identify where the hard fault occurred. The hard fault handler demonstrated here also reports other stacked register values. It is suggested that can create the HardFault handler wrapper using an attribute naked C function with inline assembly code to locate the stack frame and jump to the C code. It is suggested that after the program image is generated, one need to program the image onto the flash memory of the microcontroller and test/debug the application.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.