Secure boot in S32K144EVB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Secure boot in S32K144EVB

1,823 Views
Prkh
Contributor I

I have an example code from NXP  4_secure_boot_add_BOOT_MAC_manual.7z, attached in the message.

        There if you see in the main. c the below is the comment mentioned but no API's are there to perform that step
        /* Step-1 Program the code/program flash with the code to be protected. */

     can you guide how to perform step 1?

0 Kudos
6 Replies

1,801 Views
Prkh
Contributor I

Hi Lucas,
So it means can we use the Flash driver API of the attached file.
1.First will erase the flash area where I need to load the bootloader or application using the API (FlashEraseAllBlock)
2.Will program it using the API (FlashProgram)
   Let me know if this procedure is correct?
   And here in this file if you see there are two API FlashProgram and FlashProgramSection, what is the significance between both the API can you explain it?

0 Kudos

1,812 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

this step talks about your application/firmware which you are going to protect by secure boot. So, just take your application (whatever it is) and program it to the microcontroller.

Regards,

Lukas

 

0 Kudos

1,799 Views
Prkh
Contributor I

Hi Lucas,
So it means can we use the Flash driver API of the attached file.
1.First will erase the flash area where I need to load the bootloader or application using the API (FlashEraseAllBlock)
2.Will program it using the API (FlashProgram)
   Let me know if this procedure is correct?
   And here in this file if you see there are two API FlashProgram and FlashProgramSection, what is the significance between both the API can you explain it?

0 Kudos

1,787 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

you can simply use SWD programmer (like Pemicro, Segger or whatever else). When you receive new chip from factory, the only way to initially program the chip is to use SWD programmer. So, you can program your bootloader+application at once and then you can follow the rest of the procedure. Flash API should be used rather by bootloader when you are going to update the application.

Regards,

Lukas

 

0 Kudos

1,766 Views
Prkh
Contributor I

Hi Lucas,
    Thanks for your reply. Unfortunately, I don't have a SWD debugger. I'm using GDB PEMicro Interface and Interface setting: OpenSDA Embedded Debug-USB port
     1.you mean even to load the bootloader alone for the first time we need to use this SWD debugger.
     2.why can't we do with the FLASH_API.to program the bootloader in a specified address
     3.If bootloader was there and I need to flash the new application only on that scenario alone we need to use FLASH_API's.

      Can you clarify the above points?

0 Kudos

1,732 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

SWD is interface on the microcontroller used for programming and debugging. OpenSDA is also "SWD programmer/debugger".

If you have blank chip, the only option is to use OpenSDA (or any other tool using SWD interface) to program the chip. There's nothing like in-built bootloader or something like that.

If you want to use Flash API to program the chip, you would have to load some code via SWD anyway (to RAM, for example) but I can't see an advantage of doing this. That's just unnecessary step.

Regards,

Lukas

 

 

0 Kudos