Update start up file based on build configuration (Release or Debug)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Update start up file based on build configuration (Release or Debug)

1,378件の閲覧回数
saireddy_saredd
Contributor III

Hallo 

I am working with S32K14x micro controlles.

I want to enable or disable the JTAG interface. So, want to manipulate the Flash section in start up file.
Is it possible to manipulate the start-up file based on the build configuration?

 

 

/* Flash Configuration */
    .section .FlashConfig, "a"
    .long 0x01234567     /* 8 bytes backdoor comparison key           */
    .long 0x89ABCDEF     /*                                           */
    .long 0xFFFFFFFF     /* 4 bytes program flash protection bytes    */

//Only applicable for DEBUG configuration
#ifndef RELEASE_CONFIG
/* Flash Configuration */
    .long 0xFFFF7FBF     /* FDPROT:FEPROT:FOPT:FSEC(0xBF = backdoor active, MCU secured) */
#else //For DEBUG configuration
    .long 0xFFFF7FFE     /* FDPROT:FEPROT:FOPT:FSEC(0xFE = unsecured) */
#endif

 

 

Best Regards,

Saidhi reddy Sareddy

0 件の賞賛
返信
3 返答(返信)

1,333件の閲覧回数
saireddy_saredd
Contributor III

Hi Vane

 

Thank you very much for the information,

Is it possible to write on these locations 0x400 to 0x400C with flash functions using SDK instead of the start-up code.(I will make sure write only once with some eeprom flags)

I did not find the direct functions in SDK.

 

0 件の賞賛
返信

1,318件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @saireddy_saredd 

Function Name : FLASH_DRV_Program() program 4 consecutive bytes (for program long word command) and 8 consecutive bytes (for program phrase command) on P-Flash or D-Flash block. This API always returns STATUS_SUCCESS if size provided by user is zero regardless of the input validation.

You can see how this function is used in the flash_partitioning_s32k1xx example.

0 件の賞賛
返信

1,358件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @saireddy_saredd 

It is possible to manipulate the startup code to enable/disable the JTAG interface.

I suggest you look at the following application notes, which be useful for you.

 

B.R.

VaneB

0 件の賞賛
返信