Part Number:STARTERWARE-SITARA
Tool/software: Code Composer Studio
Hello,
I would like to build a standalone application which print some characters in uart , and I want to loas and run it from u-boot:
As I understand:
1. Timer (ticks) is not required for standalone application, ( Right ?)
2. I need main() function. Inside the main function I can create a loop and write into UART interface registers , something like this:
void main()
{
.............
while(1)
{
// wait until there is room in the FIFO.
while (CHKBIT_REGB(uart + UART_SSR, TX_FIFO_FULL))
;
// send the character.
OUT_REGB(uart + UART_THR, in_data);
}
}
3. The build with cross compile creates elf file, which I then converted to hex, and makeimage to create u-boot loadable binary.
4. I assume that the u-boot initialization still available when moving from u-boot to the standalone application.
5. We can't return from main back to u-boot as far as I understand.
Are these assumptions correct ? Should this standalone application work ?
Can I use bootelf command instead of converting elf->hex-> u-boot_hdr_img ?
Regards,
Ran