Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Chapter 19. Starting Cortex-M3 Developme... > 19.5Accessing Special Registers - Pg. 304

304 CHAPTER 19 Starting Cortex-M3 Development Using the GNU Tool Chain // Output character to UART UART0_DATA = mychar; return; } ========== end of file ========== Theretargetingiscarriedoutbyimplementingthe"_write_r"function.Thisfunctioncallsourown characteroutputroutinetodisplaythe"Helloworld"message. 19.4.7 Example 7: Implement Your Own Vector Table IfyouarenotusingCodeSourceryG++toolchain,youmightneedtoimplementyourownvectortable. ThiscanbedonebyusingthefollowingCcode: // Define the vector table __attribute__ ((section("vectors"))) void (* const VectorArray[])(void) = { (void (*)(void))((unsigned long) MainStack + sizeof(MainStack)), Reset_Handler, NMI_Handler, HardFault_Handler