Hi All,
I am porting a Boot Application for MPC5775E from MPC5744P , so to start with I created a project using the S32DS to blink LED and I changed the default flash address from 00800000 to 0 in linker_flash.ld as below
/* Define FLASH */
/*FLASH_BASE_ADDR = DEFINED(__flash_base_addr__) ? __flash_base_addr__ : 0x00800008;*/
FLASH_BASE_ADDR = DEFINED(__flash_base_addr__) ? __flash_base_addr__ : 0x00000008;
/*FLASH_SIZE = DEFINED(__flash_size__) ? __flash_size__ : 2048K - 0x08;*/
FLASH_SIZE = DEFINED(__flash_size__) ? __flash_size__ : 128K - 0x08;
MEMORY
{
flash_rchw : org = 0x00000000, len = 0x4
cpu0_reset_vec : org = 0x00000000+0x04, len = 0x4
But when I try to flash with OpenSda I get the error during flash programming msg as below
Log is shown as below
Connection from "127.0.0.1" via 127.0.0.1. Connection from port "63368" to 7224
Copyright 2018 P&E Microcomputer Systems,Inc.
Command Line :C:\NXP\S32DS_Power_v2.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.8.7.201906071634\win32\pegdbserver_power_console -device=MPC5775E -startserver -singlesession -serverport=7224 -gdbmiport=6224 -interface=OPENSDA -speed=5000 -port=USB1¤
CMD>RE
Initializing.
Device IDCODE is $00000377
Device ID revision is $00000001
MPC5777C Device detected.
Target has been RESET and is active.
CMD>CM C:\NXP\S32DS_Power_v2.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.8.7.201906071634\win32\gdi\P&E\nxp_mpc5775e_1x32x1024k_cflash_highspeed.pcp
Initializing.
Device IDCODE is $00000377
Device ID revision is $00000001
MPC5777C Device detected.
Initialized.
;version 1.00, 07/13/2018, Copyright P&E Microcomputer Systems, www.pemicro.com [5775EB_4meg_highspeed]
;device NXP, MPC5775E, 1x32x1024k, desc=CFlash_highspeed
;begin_cs device=$00800000, length=$00400000, ram=$00300000
Loading programming algorithm ...
Done.
Programming sequency is : erase, blank check, program, and verify {default}
CMD>VC
Verifying object file CRC-16 to device ranges ...
Error - no valid data in range of module.
Current content of flash does not match application to be programmed
CMD>EM
Erasing.
Module has been erased.
CMD>PM
Programming.
Processing Object File Data ...
No data to program.
.
Error during programming.
Error Programming flash of device
Error occured during Flash programming.
Device IDCODE is $00000377
Device ID revision is $00000001
Starting reset script (C:\NXP\S32DS_Power_v2.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.8.7.201906071634\win32\gdi\P&E\s32e200_mpc5777c.mac) ...
REM This script is compatible with MPC5777C devices.
REM Clean GPRs to remove residual data after using algorithm
REM Setup MMU for for Periph B Modules
REM Base address = $FFE0_0000
REM TLB0, 2 MByte Memory Space, Guarded, Don't Cache, All Access
Once Status Register Result = $0209
REM Set up MMU to put internal Flash at 0...
REM Virtual address 0x0 -> Physical address = $0000_0000
REM TLB1, 16 MByte Memory Space, Not Guarded, Cachable, All Access
Once Status Register Result = $0209
REM Set up MMU for External Memory
REM Base address = $2000_0000
REM TLB2, 16 MByte Memory Space, Not Guarded, Cachable, All Access
Once Status Register Result = $0209
REM Set up MMU for Internal SRAM
REM Base address = $4000_0000
REM TLB3, 512 KByte Memory Space, Not Guarded, Don't Cache, All Access
Once Status Register Result = $0209
REM Set up MMU for Periph A Modules
REM Base address = $C3E0_0000
REM TLB4, 2 MByte Memory Space, Guarded, Don't Cache, All Access
Once Status Register Result = $0209
REM Initialize all of the Main SRAM - 512KB
Initializing RAM from $40000000 to $4007FFFF.
Reset script (C:\NXP\S32DS_Power_v2.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.8.7.201906071634\win32\gdi\P&E\s32e200_mpc5777c.mac) completed.
MPC5777C Device detected.
PE-ERROR: Error downloading to the device.
Disconnected from "127.0.0.1" via 127.0.0.1. Disconnection by port "63368" from 7224
Target Disconnected.
Please let me know how to update the linker to properly flash to custom flash address?
Thanks,
已解决! 转到解答。
Hi,
there are two pcp files from Pemicro:
The first one (default one) covers only code flash starting at 0x800000.
The second one covers first blocks at 0x0 which are intended mainly for EEPROM.
If you want to program also this area, this configuration is necessary:
Regards
Lukas
Hi,
there are two pcp files from Pemicro:
The first one (default one) covers only code flash starting at 0x800000.
The second one covers first blocks at 0x0 which are intended mainly for EEPROM.
If you want to program also this area, this configuration is necessary:
Regards
Lukas
Thanks for your reply @lukaszadrapa
From your comment and reference manual the address 0 - 3FFFF is recommended for Data Flash and the boot is recommended to be in 800000 - 83FFFF. But since my boot won't go more than 32k, Is it OK to use the CSE (recommended) space for the boot application?
Regards!