This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hello guys,
I recently started a project with cc1314 series, and I am trying to implement bootloader. Right now I am simply using MCUboot and Sensor_oad_offchip as my projects . In the end I want to create custom bootloader as mcuboot complexity is not needed.
Now lets get to the issue, as the titles suggests I cant jump from mcuboot to my sensor_oad_offchip application.
I have modified the mcuboot code to just simple jump to the prgentry address of the application which is given in OAD header, but it does not work. I have done this process before on cc1357 and I also created an custom bootloader using BIM on that mcu and never faced this issue on that.
Here is the mcuboot code
As you can see, I have commented out all the parts related to mcuboot and directly jumping to the vector table of sensor_oad_offchip application, but it does not work.
My end goal is just to use mcuboot and sensor_oad_offchip projects as a reference and create my own headers and everything else.
int main(void) { fih_int bootStatus; struct boot_rsp bootRsp; #ifndef EXCLUDE_GPIOS powerUpGpio(); lightRedLed(); #endif //EXCLUDE_GPIOS // trace_init(); // MCUBOOT_LOG_INF("mcuboot_app"); // //#ifdef MCUBOOT_HW_ROLLBACK_PROT // // if (FIH_SUCCESS != boot_nv_security_counter_init()) { // MCUBOOT_LOG_INF("bootRsp: failed to initialize secure counter page"); // mcubootFail(); // } // //#endif // bootStatus = boot_go(&bootRsp); // //#ifdef MCUBOOT_HW_ROLLBACK_PROT // lockBimSector(); //#endif // // if ((0 == bootStatus) && (IMAGE_MAGIC == bootRsp.br_hdr->ih_magic)) // { // blinkLed(GREEN_LED, 3, 500); // MCUBOOT_LOG_INF("bootRsp: slot = %x, offset = %x, ver=%d.%d.%d.%d", // bootStatus, // bootRsp.br_image_off, // bootRsp.br_hdr->ih_ver.iv_major, // bootRsp.br_hdr->ih_ver.iv_minor, // bootRsp.br_hdr->ih_ver.iv_revision, // bootRsp.br_hdr->ih_ver.iv_build_num); // // do_boot(&bootRsp); // } // else // { // MCUBOOT_LOG_INF("bootRsp: no image found"); // mcubootFail(); // } start_app((uint32_t *)0x00006000); mcubootFail(); }
I also noticed that the actual vector table address was 0x6080, I even tried that but still did not boot into application.
Hi Hamza,
Per default, MCU has a number of checks including a CRC check before jumping to an image.
Did you program the sensor_oad_offchip application directly or did you run it through the OAD image tool first? (You get a .bin file.) Maybe it would be a good first step to go through an OAD with the default example before you start implementing your own bootloader?
We have this SimpleLink academy lab which walks you through some OAD debugging. Please see task 3.
Cheers,
Marie H
Hi thanks for your reply.
I have tested this setup before on cc1357 with sensor_oad_offchip and BIM image, and it works so I have some idea but not very much.
anyhow. I directly uploaded the sensor_oad_offchip example and MCUboot example using uniflash. At the first the sensor_oad_offchip application is loaded fine and the output is shown on serialmonitor, but when I reset I cant go back into the application due to MCUboot not jumping to the required address.
According to my understanding the OAD headers are only required if you are doing OAD, other than that for simple jumping to the already loaded example those are not required as we are jumping straigth to vector table address, this is how I did it in cc1357.
Hi Hamza,
MCUBoot will check oad image headers on every wake-up. I don't know if you took this out in your implementation. But if you're using our MCUboot implementation you will need a valid CRC for the MCUBoot to jump to the image.
Cheers,
Marie H
Yes I Understand that and took it out, I commented out everything and just kept start_app((uint32_t *)0x00006000);