Secure boot in S32K144EVB

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Secure boot in S32K144EVB

3,326 次查看
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 项奖励
回复
6 回复数

3,304 次查看
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 项奖励
回复

3,315 次查看
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 项奖励
回复

3,302 次查看
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 项奖励
回复

3,290 次查看
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 项奖励
回复

3,269 次查看
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 项奖励
回复

3,235 次查看
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 项奖励
回复