Hello Diana,
I am using S32K148EVB, in this modifying boot loader implementation is in progress.
I am not using any terminal console, i want to use the terminal to print the data to debug.
Refer the below code
int bootloader1(void)
{
/* Initialize clock */
clock_initi();
/* Initialize communication interfaces */
init_comm();
/* Initialize timeout */
init_timeout();
printf("\n Bootloader 1 is running");
/* Check if boot start has been received or timeout occurred */
do{
uint8_t word_received = comm_status_rx();
if(word_received){
boot_from_comm = 1;
comm_download_app();
}
} while((!timeout()) & (!boot_from_comm));
/* Disable all systems and leave device as if coming out of reset */
disable_timeout();
disable_comm();
reset_clock();
/* Check if a valid application is loaded and jump to it */
JumpToUserApplication(*((uint32_t*)APP_START_ADDRESS), *((uint32_t*)(APP_START_ADDRESS + 4)));
/* Should never return from application code */
for (;;) {};
/* Never leave main */
return 0;
}
int bootloader2 (void)
{
printf("\n Bootloader 2 is running");
return 0;
}
In startup_S32K148.S
Reset_Handler:
/* Init .data and .bss sections */
ldr r0,=init_data_bss
blx r0
cpsie i /* Unmask interrupts */
ldr r0,=bootloader2
blx r0
bl bootloader1
I would like to ensure that both print statements are executed or not.
for that I need terminal console.
Hope I have explained the issue, in case of need of more info pls write again.