We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello
I got an interest on LPC55S14 Microcontroller. I'm using keil uvision 5 IDE. I would like to try programming this chip using assembly language. Can I have a sample startup file and a simple main file just to begin with?
By the way, I'm already familiar with arm cortex m3/m4 instructions.
Thanks and best regards.
As far as I can see, the default startup file shipped by NXP in their LPC55S14_DFP version 18 is still in assembler. So you can have a look there (_YOUR_PACK_ROOT_\NXP\LPC55S14_DFP\18.0.0\devices\LPC55S14\gcc\startup_LPC55S14.S) for refence.
For other examples it is probably best, you use the compiler to let it produce assembly code (https://developer.arm.com/documentation/ka003163/latest/) and then use the generated assembler file from a simple C module as starting point.
These might also be useful for you:
https://learn.arm.com/learning-paths/microcontrollers/asm/
https://learn.arm.com/learning-paths/microcontrollers/efficient_embedded/coding/
***Note: for Cortex-M devices, be careful of bit[0]
Bit[0] being zero can clear the T-bit in the Program Status Registers (xPSR). If this happens, the device will halt.
https://developer.arm.com/documentation/ddi0337/h/programmers-model/exceptions?lang=en
https://developer.arm.com/documentation/ka001193/latest/
You might run into this with:
vector table entries Reset vector valueAddress for Jump instructions