First, thank-you Martin Thomas for putting together this great collection of tools for the ARM. Thanks to your examples I quickly had an LED blinking on my hardware. I've done quite a bit of embedded programming but I'm not very familiar with the GCC compilation process. I've been using WinAVR for a while now and so most of my questions are about the differences between WinAVR and WinARM. From my understanding, when you start a new WinARM project you need to provide a startup file (crt0.S) and a linker script (such as LPC2106-ROM.ld), in addition to the makefile, source, and header files. How do the startup file and linker script differ from processor to processor or from project to project? In particular, I want to create a project using the LPC2103. Can I just copy the LPC2106-ROM.ld script and change the memory sizes to match the LPC2103 or is there more involved? Do I need to make any changes to the crt0.S file to make it work for this new processor? Do I need to make changes to this file to use various interrupts? Thanks for the help, Phil
phil wrote: > First, thank-you Martin Thomas for putting together this great > collection of tools for the ARM. Thanks to your examples I quickly had > an LED blinking on my hardware. I'm glad that the collection is useful for you. > I've done quite a bit of embedded programming but I'm not very familiar > with the GCC compilation process. I've been using WinAVR for a while > now and so most of my questions are about the differences between WinAVR > and WinARM. From my understanding, when you start a new WinARM project > you need to provide a startup file (crt0.S) and a linker script (such as > LPC2106-ROM.ld), in addition to the makefile, source, and header files. > > How do the startup file and linker script differ from processor to > processor or from project to project? Usualy they just differ from processor/target to target. Sometimes I have modified startup and linker-skripts for special tasks but for the beginning it should be ok to copy the files from the examples. > In particular, I want to create a project using the LPC2103. Can I just > copy the LPC2106-ROM.ld script and change the memory sizes to match the > LPC2103 or is there more involved? I do not own a LPC2103, adapting the memory-sizes might be enough but I'm not sure. > Do I need to make any changes to the crt0.S file to make it work for > this new processor? Do I need to make changes to this file to use > various interrupts? I don't think that you need to change the startup-code in terms for interrupt-handling, but you will see different approaches. Some developers use "interrupt wrappers" to call ISR others use macros inside ISRs. I currently don't remember of a "wrapper"-example for LPC is in the examples-directory. But there is one for AT91SAM7S which can be used too. The basic ARM7-interupt handling is the same for LPC and AT91SAM. Just pick a small LPC-"blink"-example, change the memory-sections and give it a try. Describe the errors if it does not work. Hope this helps, Martin Thomas
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.