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 TI
We changed defalut flash in lp-am243 board to a custom flash device(IS25LP128F), we changed syscfg of demo "mcu_plus_sdk_am243x_09_02_01_05\examples\drivers\boot\sbl_ospi" based on the flash SFDP printed out by OSPI FLASH Diagnostic demo.
This is all the change we made in syscfg.
And we also added "OSPI_enableDacMode(gFlashObject_IS25LP128F.ospiHandle)" after initialized ospi and flash.
But when we flashed this ospi_sbl and helloworld application binary to the target flash, we got the result as below.
DMSC Firmware Version 9.2.8--v09.02.08 (Kool Koala)
DMSC Firmware revision 0x9
DMSC ABI revision 3.1
Some tests have failed!!
We are sure that the helloworld application binary is correctly flashed as we read out each byte from the flash and verified each byte. Actually ospi sbl failed in function "Sciclient_procBootAuthAndStart ", it returned -1.
But before we changed the flash device, we did the same proceduces, and application runs correctly.
We need help for this issue, looking forward to your reply. Thanks.
Dear Prashant.
customer is checking the feasibility of new flash device "IS25LP128F". they replace " S25HL512TFAMHI010" with new device "IS25LP128F" on TI LP-AM243 EVM, then found it failed to do authentication on app image.
the AM243 silicon on this LP-AM243 EVM is HS-FS status.
they have tried to add code to print data that should be app image in flash. and they confirmed that the app image is same to the one generated in AM243 SDK.
so they wants to know how to debug this issue as DMSC seems invisible? please help.
int32_t Bootloader_verifyMulticoreImage(Bootloader_Handle handle)
{
CacheP_wbInv((void *)certLoadAddr, cacheAlignedLen, CacheP_TYPE_ALL);
//here is the place that they add code to print data from address certLoadAddr with size cacheAlignedLen.
/* Check if the certificate length is within valid range */
if((certLen > 0x100) && (certLen < 0x800))
{
if(config->disableAppImageAuth == TRUE)
{
/* NOTE: This is an option to skip image authentication in a signed
image to aid initial development on HS devices. If the user has
opted to disable image authentication, do not authenticate/decrypt.
Skip the certificate length and start loading as in GP */
authStatus = SystemP_SUCCESS;
}
else
{
authStatus = Bootloader_socAuthImage(certLoadAddr);
}
}
thanks a lot!
yong
Dear cheng.
1. Please check my latest post, and add more if you did more experiment.
2. as you mentioned, "And we also added "OSPI_enableDacMode(gFlashObject_IS25LP128F.ospiHandle)" after initialized ospi and flash.". Please help clarify why you add this code by manual?
3. as discussed, you replace " S25HL512TFAMHI010" with new device "IS25LP128F" on TI LP-AM243 EVM, then found this issue. Please help provide the spec.
4. and as you found, there is no RESET pin for device "IS25LP128F". may I ask if there is special requirement because of no RESET from this device perspective?
5. as discussed, SBL set OSPI controller in DAC mode, then send an address which mapping to the image in flash, to DMSC for authentication. Could you please help do an experiment? add code to read whole image to local variable, then send to DMSC for authentication?
6. please have a try, change OSPI_RESETPIN_DEDICATED to OSPI_RESETPIN_DQ3.
static int32_t Flash_norOspiOpen(Flash_Config *config, Flash_Params *params)
{
OSPI_configResetPin(obj->ospiHandle, OSPI_RESETPIN_DEDICATED); -> OSPI_configResetPin(obj->ospiHandle, OSPI_RESETPIN_DQ3);
}
thanks a lot!
yong
We did three experiments.
1. turn phy-enable on, function Bootloader_socAuthImage returns -1
2. Call OSPI_disableDacMode before Bootloader_socAuthImage, Bootloader_socAuthImage returns -1.
3.Change 4s_4s_4s to 1s_1s_1s can't read flash data properly,ERROR: Flash_norOspiOpen:1317: Flash_norOspiOpen : PHY enabling failed!!!! Continuing without PHY...
ERROR: Board_flashOpen:183: FLASH open failed for instance 0 !!!!
ASSERT: 0.174283s: ... /main.c:main:136: status == SystemP_SUCCESS failed !!!!!
2. as you mentioned, "And we also added "OSPI_enableDacMode(gFlashObject_IS25LP128F.ospiHandle)" after initialized ospi and flash.". Please help clarify why you add this code by manual?
In Bootloader_findSeq function it is the flash data directly accessed by passing in the address of flashArgs->appImageOffset + SOC_getFlashDataBaseAddr(), while after we change the flash, this operation can only be done manually by calling OSPI_ enableDacMode(gFlashObject_IS25LP128F.ospiHandle), otherwise, data abort will occur.
3. as discussed, you replace " S25HL512TFAMHI010" with new device "IS25LP128F" on TI LP-AM243 EVM, then found this issue. Please help provide the spec.
5. as discussed, SBL set OSPI controller in DAC mode, then send an address which mapping to the image in flash, to DMSC for authentication. Could you please help do an experiment? add code to read whole image to local variable, then send to DMSC for authentication?
The authentication using this approach is passed
Dear all,
I am workmate of P zy.
I attached the latest test result and our hello world image zip file. please check file "data_20240816.zip", you need go to www.DreamSourceLab.com to download tool to open "DSLogic-la-240815-184957.dsl".
"DSLogic-la-240815-184957.dsl" contains the oscilloscope waveform of DMSC reading flash command. Please check. Looking forward to your reply. Thanks.
Dear all,
The waveform was grabbed after the Bootloader_socAuthImage function was called, and we compared the beginning of the waveform to the beginning of hello_world.appimage.hs_fs, and they are the same, but in the end Bootloader_socAuthImage returned -1.
Hello,
Thank you for the detailed analysis till now!!
and we compared the beginning of the waveform to the beginning of hello_world.appimage.hs_fs, and they are the same,
Have you compared all the bytes? Even one byte corruption is enough for authentication failure.
In any case, could you please enable & share the SYSFW logs.
Regards,
Prashant
Hello, Prashant !
Thank you for your reply.
I don't know how to turn on SYSFW logs, can you provide a way to turn it on, thank you very much!
Regards,
Pzy
Dear All
Please check file "decoder_ospi_data.zip", data in decoder_ospi_data.hex seems short than expected. decoder_ospi_data.zip
Hello,
The Sysfw logs can be enabled as follows:
If the above steps are followed correctly, you should see SYSFW logs on MAIN_UART1.
If the UART1 is not available, you may get the SYSFW logs from the memory buffer as described here. You may need debugger to save the logs from the memory.
software-dl.ti.com/.../trace.html
In case, you do not have debugger available, you may include this function & call it just after the Bootloader_socAuthImage to dump the logs on the same UART as used by the SBL.
void dump_sysfw_logs() { #define SYSFW_LOGS_BUFFER_ADDR 0x44043000 #define SYSFW_LOGS_BUFFER_SIZE 0x0FE0 uint8_t* ptr = (uint8_t*)SYSFW_LOGS_BUFFER_ADDR; DebugP_log("\r\n<<SYSFW_LOGS\r\n"); for(int32_t i = 0; i < SYSFW_LOGS_BUFFER_SIZE; i++) { DebugP_log("%c", *ptr); ptr++; } DebugP_log("\r\nSYSFW_LOGS\r\n"); }
Regards,
Prashant
Please check file "decoder_ospi_data.zip", data in decoder_ospi_data.hex seems short than expected.
Are you saying the full data is not read correctly?
Yes! From the waveform, it doesn't read out the whole firmware completely, but the parts that are read are all right, you can correspond with the previously uploaded file hello_world.appimage.hs_fs and you can see that
I will take your words. I will see later if I can install the tool & see myself the differences.
For now, the SYSFW logs will be really helpful. I suspect the authentication procedure is preempting in the middle for some reason which results in no more fetching the data from OSPI.
Hi this is the log
<<SYSFW_LOGS
00202
0x61C00051
0x62000000
0xC20101
0xC20024
0x61800101
0x61C00051
0xC20104
0xC20024
0x61800104
0x61C00051
0xC20103
0xC20024
0x61800103
0x61C00051
0xC20100
0xC20024
0x61800100
0x61C00051
0x62000000
0x60C0009D
0xC20102
0xC20024
0x61800102
0x61C00051
0x62000001
0xC2010D
0xC20024
0x6180010D
0x61C00051
0x612B7C91
0xC2010C
0xC20024
0x6180010C
0x61C00051
0x612B7C91
0x612B7C91
0xC20201
0xC20024
0x61800201
0x61C00052
0xC20200
0xC20024
0x61800200
0x61C00052
0x62000002
0x62C0E000
0x6403E000
0x64006004
0x62C0E001
0x6080009E
0x608000A0
0x60000052
0x6383E000
0x63806004
0xC20202
0xC20024
0x61800202
0x61C00052
0x62000000
0xC20101
0xC20024
0x61800101
0x61C00052
0xC20104
0xC20024
0x61800104
0x61C00052
0xC20103
0xC20024
0x61800103
0x61C00052
0xC20100
0xC20024
0x61800100
0x61C00052
0x62000000
0x60C0009E
0xC20102
0xC20024
0x61800102
0x61C00052
0x62000001
0xC2010D
0xC20024
0x6180010D
0x61C00052
0x612B7C91
0xC2010C
0xC20024
0x6180010C
0x61C00052
0x612B7C91
0x612B7C91
0xC2C120
0xC20024
0x20C00003
0041
0x64000041
0x63802000
0x64002000
0x62C0004B
0x63804000
0x64004000
0x62C0004C
0x63806003
0x64006003
0x63810003
0x64010003
0x6381C001
0x6401C001
0x63830003
0x64030003
0x63832002
0x64032002
0x6300004D
0x63008007
0x6300C001
0x6300E001
0x63012001
0x6000008C
0x6390000B
0x6410000B
0x63904000
0x64104000
0x63902001
0x64102001
0x62D00012
0x63906001
0x64106001
0x63908001
0x64108001
0x63100013
0x60800024
0x6080007E
0x60800064
0x6000008D
0x63800042
0x62C0004C
0x64000042
0x60800025
0x6080007F
0x60800065
0x6000008E
0x63800043
0x62C0004D
0x64000043
0x60800026
0x60800080
0x60800066
0x6000008F
0x63800044
0x62C0004E
0x64000044
0x60800027
0x60800081
0x60800067
0x60000090
0x63800045
0x62C0004F
0x64000045
0x60800028
0x60800082
0x60800068
0x60000091
0x63800046
0x62C00050
0x64000046
0x608000B2
0x608000B9
0x60000092
0x63800047
0x62C00051
0x64000047
0x608000C5
0x608000D1
0x608000CF
0x60000093
0x6390000C
0x62D00012
0x6410000C
0x608000C6
0x608000D2
0x608000D0
0x60000094
0x6390000D
0x62D00013
0x6410000D
0x60000095
0x6390000E
0x62D00014
0x6410000E
0x60000096
0x63800048
0x62C00052
0x64000048
0x60000097
0x63800049
0x62C00053
0x64000049
0x608000B3
0x608000BA
0x60000098
0x6380004A
0x62C00054
0x6400004A
0x608000B4
0x608000BB
0x60000099
0x6380004B
0x62C00055
0x6400004B
0x608000B5
0x608000BC
0x6000009A
0x6380004C
0x62C00056
0x6400004C
0x608000B6
0x608000BD
0x6000009B
0x6380004D
0x62C00057
0x6400004D
0x608000B7
0x608000BE
0x6000009C
0x6380004E
0x62C00058
0x6400004E
0x6080003E
0x608000DB
0x608000E0
0x608000E1
0x6080003A
0x608000C1
0x608000CD
0x60800040
0x60800041
0x60800042
0x60800043
0x60800044
0x60800045
0x6080002C
0x6080002D
0x60800005
0x6080000D
0x60800014
0x60800018
0x6080001A
0x6080001C
0x6080001E
0x60800020
0x60800021
0x60800022
0x608000C0
0x6000009D
0x608000B8
0x608000BF
0x6000009E
0x6380004F
0x62C00059
0x6400004F
0x600000A0
0x6390000F
0x62D00015
0x6410000F
0x600000A3
0x63804001
0x62C0005A
0x64004001
0x600000A4
0x63804002
0x62C0005B
0x64004002
0x63D00010
0x64500010
0x63D04001
0x63D02002
0x64504001
0x63100016
0x64502002
0x63D06002
0x4003007
0x4400928
0x64506002
0x63D08002
0x64508002
0x63C00050
0x64400050
0x63C02001
0x64402001
0x6300005C
0x63C04003
0x64404003
0x63C06004
0x64406004
0x63C10004
0x64410004
0x63C1C002
0x6441C002
0x63C30004
0x64430004
0x63C32003
0x64432003
0x68400000
0x60C000A3
0xC20102
0xC20024
0x61800102
0x61C0184B
0x62000007
0xC2010D
0xC20024
0x6180010D
0x61C0184B
0x61297C88
0xC2010C
0xC20024
0x6180010C
0x61C0184B
0x61297C88
0x61297C88
0xC20101
0xC20024
0x61800101
0x61C00092
0xC20104
0xC20024
0x61800104
0x61C00092
0xC20103
0xC20024
0x61800103
0x61C00092
0xC20100
0xC20024
0x61800100
0x61C00092
0x62000000
0x60C000B9
0x60C000B2
0xC20102
0xC20024
0x61800102
0x61C00092
0x62000001
0xC2010D
0xC20024
0x6180010D
0x61C00092
0x61276CB2
0xC2010C
0xC20024
0x6180010C
0x61C00092
0x61276CB2
0x61276CB2
0xC20002
0xC20024
0x4003007
0x4400928
0xC20201
0xC20024
0x61800201
0x61C00051
0xC20200
0xC20024
0x61800200
0x61C00051
0x62000002
0x62C0C000
0x6403C000
0x64006003
0x62C0C001
0x6080009D
0x6080009F
0x60000051
0x6383C000
0x63806003
0xC20202
0xC20024
0x618
SYSFW_LOGS
Hello,
Thank you for sharing the logs!!
These are the relevant logs for TISCI_MSG_PROC_AUTH_BOOT
0x00C2C120: BasePort: Unknown Action: 0x03 MSG:0x02C120
0x00C20024: BasePort: Unknown Action: 0x03 MSG:0x020024
0x20C00003: Security: SEC_BOOT(Points of failures during secure boot api call): 0x01 => Certificate length > ASN1P_IMAX, 0x02 => Issue fetching certificate, 0x3 => Issue with Hash operation, 0x4 => Hash comparison fails: 3
The reason of the failure is "Issue with Hash operation". This is possibly because of the PKTDMA read incompatibility with the custom OSPI flash in DAC mode.
Are you already running the OSPI at its highest mode possible? Could you try different flash configurations like increasing/decreasing frequency, protocols, PHY enable/disable, DMA enable/disable, etc?
Hello,
When enabling PHY mode, SystemP_FAILURE was returned on line 1315.
And SystemP_FAILURE status set in line 1842 in function OSPI_phyTuneDDR.
Is the PHY mode enabled related to Flash configuration? How can we properly enable PHY.
The problem has been resolved, PHY mode initialization failed due to poor flash signal quality in the fly wire connection.
Hello!
We tried a few different frequencies: 100000000/4Hz,, 100000000/8Hz,, 100000000/10Hz, all failed. And when trying the frequency 100000000/2Hz sbl doesn't output anything at all, it should send some kind of error. Also disabling the dma mode does not pass the Bootloader_socAuthImage !
Hi, have you tested the OSPI_FLASH_IO & OSPI_FLASH_DMA examples with your custom flash part?
Yes! We tested it and all tests passed. The SDK used is mcu_plus_sdk_am243x_09_02_01_05.
The system configuration files for the two demos are as follows:
ospi_flash_dma.syscfg
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "AM243x_ALX_beta" --package "ALX" --part "ALX" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM243x@09.02.01"
* @versions {"tool":"1.20.0+3587"}
*/
/**
* Import the modules used in this configuration.
*/
const flash = scripting.addModule("/board/flash/flash", {}, false);
const flash1 = flash.addInstance();
const udma = scripting.addModule("/drivers/udma/udma", {}, false);
const udma1 = udma.addInstance();
const clock = scripting.addModule("/kernel/dpl/clock");
const debug_log = scripting.addModule("/kernel/dpl/debug_log");
const mpu_armv7 = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
const mpu_armv71 = mpu_armv7.addInstance();
const mpu_armv72 = mpu_armv7.addInstance();
const mpu_armv73 = mpu_armv7.addInstance();
const mpu_armv74 = mpu_armv7.addInstance();
const default_linker = scripting.addModule("/memory_configurator/default_linker", {}, false);
const default_linker1 = default_linker.addInstance();
const general = scripting.addModule("/memory_configurator/general", {}, false);
const general1 = general.addInstance();
const region = scripting.addModule("/memory_configurator/region", {}, false);
const region1 = region.addInstance();
const section = scripting.addModule("/memory_configurator/section", {}, false);
const section1 = section.addInstance();
const section2 = section.addInstance();
const section3 = section.addInstance();
const section4 = section.addInstance();
const section5 = section.addInstance();
const section6 = section.addInstance();
const section7 = section.addInstance();
const section8 = section.addInstance();
const section9 = section.addInstance();
const section10 = section.addInstance();
const section11 = section.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
flash1.$name = "CONFIG_FLASH0";
flash1.flashSize = 16777216;
flash1.flashManfId = "0x9D";
flash1.flashDeviceId = "0x6018";
flash1.flashBlockSize = 65536;
flash1.cmdBlockErase4B = "0xD8";
flash1.cmdSectorErase4B = "0x20";
flash1.flashQeType = "2";
flash1.dummy_cfgReg = "0x00000000";
flash1.resetType = "0x30";
flash1.idNumBytes = 5;
flash1.dummyId8 = 0;
flash1.fourByteEnableSeq = "0xA9";
flash1.flashDeviceBusyTimeout = 36000000;
flash1.flashPageProgTimeout = 200;
flash1.device = "CUSTOM_FLASH";
flash1.fname = "IS25LP128F";
flash1.dummy_isAddrReg = false;
flash1.dummy_cmdRegWr = "0x63";
flash1.dummy_cmdRegRd = "0x61";
flash1.addressByteSupport = "2";
flash1.flash444Seq = "0x04";
flash1.protocol = "4s_4s_4s";
flash1.dummy_mask = "0xff";
flash1.proto_cmdRegRd = "0x16";
flash1.proto_cmdRegWr = "0x18";
flash1.proto_bitP = 1;
flash1.proto_shift = 7;
flash1.proto_mask = "0x80";
flash1.cmdRd = "0xEB";
flash1.dummy_bitP = 0;
flash1.modeClksRd = 0;
flash1.dummyClksRd = 6;
flash1.peripheralDriver.$name = "CONFIG_OSPI0";
flash1.peripheralDriver.inputClkFreq = 100000000;
flash1.peripheralDriver.phyEnable = true;
flash1.peripheralDriver.dmaEnable = true;
udma1.$name = "CONFIG_UDMA0";
flash1.peripheralDriver.udmaDriver = udma1;
udma1.udmaBlkCopyChannel.create(1);
udma1.udmaBlkCopyChannel[0].$name = "CONFIG_UDMA_BLKCOPY_CH0";
debug_log.enableUartLog = true;
debug_log.uartLog.$name = "CONFIG_UART_LOG";
debug_log.uartLog.UART.$assign = "USART0";
const uart_v0_template = scripting.addModule("/drivers/uart/v0/uart_v0_template", {}, false);
const uart_v0_template1 = uart_v0_template.addInstance({}, false);
uart_v0_template1.$name = "drivers_uart_v0_uart_v0_template0";
debug_log.uartLog.child = uart_v0_template1;
mpu_armv71.$name = "CONFIG_MPU_REGION0";
mpu_armv71.size = 31;
mpu_armv71.attributes = "Device";
mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
mpu_armv71.allowExecute = false;
mpu_armv72.$name = "CONFIG_MPU_REGION1";
mpu_armv72.size = 15;
mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
mpu_armv73.$name = "CONFIG_MPU_REGION2";
mpu_armv73.baseAddr = 0x41010000;
mpu_armv73.size = 15;
mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
mpu_armv74.$name = "CONFIG_MPU_REGION3";
mpu_armv74.baseAddr = 0x70000000;
mpu_armv74.size = 21;
mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
default_linker1.$name = "memory_configurator_default_linker0";
general1.$name = "CONFIG_GENERAL0";
general1.linker.$name = "TIARMCLANG0";
region1.$name = "MEMORY_REGION_CONFIGURATION0";
region1.memory_region.create(9);
region1.memory_region[0].type = "TCMA_R5F";
region1.memory_region[0].$name = "R5F_VECS";
region1.memory_region[0].size = 0x40;
region1.memory_region[0].auto = false;
region1.memory_region[1].type = "TCMA_R5F";
region1.memory_region[1].$name = "R5F_TCMA";
region1.memory_region[1].size = 0x7FC0;
region1.memory_region[2].type = "TCMB_R5F";
region1.memory_region[2].$name = "R5F_TCMB0";
region1.memory_region[2].size = 0x8000;
region1.memory_region[3].$name = "NON_CACHE_MEM";
region1.memory_region[3].auto = false;
region1.memory_region[3].manualStartAddress = 0x70060000;
region1.memory_region[3].size = 0x8000;
region1.memory_region[4].$name = "MSRAM";
region1.memory_region[4].auto = false;
region1.memory_region[4].manualStartAddress = 0x70080000;
region1.memory_region[4].size = 0x100000;
region1.memory_region[5].type = "FLASH";
region1.memory_region[5].$name = "FLASH";
region1.memory_region[5].auto = false;
region1.memory_region[5].manualStartAddress = 0x60100000;
region1.memory_region[5].size = 0x80000;
region1.memory_region[6].$name = "USER_SHM_MEM";
region1.memory_region[6].auto = false;
region1.memory_region[6].manualStartAddress = 0x701D0000;
region1.memory_region[6].size = 0x180;
region1.memory_region[6].isShared = true;
region1.memory_region[6].shared_cores = ["m4fss0-0","r5fss0-1","r5fss1-0","r5fss1-1"];
region1.memory_region[7].auto = false;
region1.memory_region[7].manualStartAddress = 0x701D0180;
region1.memory_region[7].size = 0x3E80;
region1.memory_region[7].$name = "LOG_SHM_MEM";
region1.memory_region[7].isShared = true;
region1.memory_region[7].shared_cores = ["m4fss0-0","r5fss0-1","r5fss1-0","r5fss1-1"];
region1.memory_region[8].auto = false;
region1.memory_region[8].manualStartAddress = 0x701D4000;
region1.memory_region[8].size = 0xC000;
region1.memory_region[8].$name = "RTOS_NORTOS_IPC_SHM_MEM";
region1.memory_region[8].isShared = true;
region1.memory_region[8].shared_cores = ["m4fss0-0","r5fss0-1","r5fss1-0","r5fss1-1"];
section1.$name = "Vector Table";
section1.load_memory = "R5F_VECS";
section1.group = false;
section1.output_section.create(1);
section1.output_section[0].$name = ".vectors";
section1.output_section[0].palignment = true;
section2.$name = "Text Segments";
section2.load_memory = "MSRAM";
section2.output_section.create(5);
section2.output_section[0].$name = ".text.hwi";
section2.output_section[0].palignment = true;
section2.output_section[1].$name = ".text.cache";
section2.output_section[1].palignment = true;
section2.output_section[2].$name = ".text.mpu";
section2.output_section[2].palignment = true;
section2.output_section[3].$name = ".text.boot";
section2.output_section[3].palignment = true;
section2.output_section[4].$name = ".text:abort";
section2.output_section[4].palignment = true;
section3.$name = "Code and Read-Only Data";
section3.load_memory = "MSRAM";
section3.output_section.create(2);
section3.output_section[0].$name = ".text";
section3.output_section[0].palignment = true;
section3.output_section[1].$name = ".rodata";
section3.output_section[1].palignment = true;
section4.$name = "Data Segment";
section4.load_memory = "MSRAM";
section4.output_section.create(1);
section4.output_section[0].$name = ".data";
section4.output_section[0].palignment = true;
section5.$name = "Memory Segments";
section5.load_memory = "MSRAM";
section5.output_section.create(3);
section5.output_section[0].$name = ".bss";
section5.output_section[0].palignment = true;
section5.output_section[0].output_sections_start = "__BSS_START";
section5.output_section[0].output_sections_end = "__BSS_END";
section5.output_section[1].$name = ".sysmem";
section5.output_section[1].palignment = true;
section5.output_section[2].$name = ".stack";
section5.output_section[2].palignment = true;
section6.$name = "Stack Segments";
section6.load_memory = "MSRAM";
section6.output_section.create(5);
section6.output_section[0].$name = ".irqstack";
section6.output_section[0].output_sections_start = "__IRQ_STACK_START";
section6.output_section[0].output_sections_end = "__IRQ_STACK_END";
section6.output_section[0].input_section.create(1);
section6.output_section[0].input_section[0].$name = ". = . + __IRQ_STACK_SIZE;";
section6.output_section[1].$name = ".fiqstack";
section6.output_section[1].output_sections_start = "__FIQ_STACK_START";
section6.output_section[1].output_sections_end = "__FIQ_STACK_END";
section6.output_section[1].input_section.create(1);
section6.output_section[1].input_section[0].$name = ". = . + __FIQ_STACK_SIZE;";
section6.output_section[2].$name = ".svcstack";
section6.output_section[2].output_sections_start = "__SVC_STACK_START";
section6.output_section[2].output_sections_end = "__SVC_STACK_END";
section6.output_section[2].input_section.create(1);
section6.output_section[2].input_section[0].$name = ". = . + __SVC_STACK_SIZE;";
section6.output_section[3].$name = ".abortstack";
section6.output_section[3].output_sections_start = "__ABORT_STACK_START";
section6.output_section[3].output_sections_end = "__ABORT_STACK_END";
section6.output_section[3].input_section.create(1);
section6.output_section[3].input_section[0].$name = ". = . + __ABORT_STACK_SIZE;";
section6.output_section[4].$name = ".undefinedstack";
section6.output_section[4].output_sections_start = "__UNDEFINED_STACK_START";
section6.output_section[4].output_sections_end = "__UNDEFINED_STACK_END";
section6.output_section[4].input_section.create(1);
section6.output_section[4].input_section[0].$name = ". = . + __UNDEFINED_STACK_SIZE;";
section7.$name = "Initialization and Exception Handling";
section7.load_memory = "MSRAM";
section7.output_section.create(3);
section7.output_section[0].$name = ".ARM.exidx";
section7.output_section[0].palignment = true;
section7.output_section[1].$name = ".init_array";
section7.output_section[1].palignment = true;
section7.output_section[2].$name = ".fini_array";
section7.output_section[2].palignment = true;
section8.$name = "User Shared Memory";
section8.type = "NOLOAD";
section8.load_memory = "USER_SHM_MEM";
section8.group = false;
section8.output_section.create(1);
section8.output_section[0].$name = ".bss.user_shared_mem";
section8.output_section[0].alignment = 0;
section9.$name = "Log Shared Memory";
section9.load_memory = "LOG_SHM_MEM";
section9.type = "NOLOAD";
section9.group = false;
section9.output_section.create(1);
section9.output_section[0].$name = ".bss.log_shared_mem";
section9.output_section[0].alignment = 0;
section10.$name = "IPC Shared Memory";
section10.type = "NOLOAD";
section10.load_memory = "RTOS_NORTOS_IPC_SHM_MEM";
section10.group = false;
section10.output_section.create(1);
section10.output_section[0].$name = ".bss.ipc_vring_mem";
section10.output_section[0].alignment = 0;
section11.$name = "Non Cacheable Memory";
section11.load_memory = "NON_CACHE_MEM";
section11.group = false;
section11.type = "NOLOAD";
section11.output_section.create(1);
section11.output_section[0].$name = ".bss.nocache";
section11.output_section[0].alignment = 0;
/**
* Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
* re-solve from scratch.
*/
flash1.peripheralDriver.OSPI.$suggestSolution = "OSPI0";
flash1.peripheralDriver.OSPI.CLK.$suggestSolution = "OSPI0_CLK";
flash1.peripheralDriver.OSPI.CSn0.$suggestSolution = "OSPI0_CSn0";
flash1.peripheralDriver.OSPI.D3.$suggestSolution = "OSPI0_D3";
flash1.peripheralDriver.OSPI.D2.$suggestSolution = "OSPI0_D2";
flash1.peripheralDriver.OSPI.D1.$suggestSolution = "OSPI0_D1";
flash1.peripheralDriver.OSPI.D0.$suggestSolution = "OSPI0_D0";
debug_log.uartLog.UART.RXD.$suggestSolution = "UART0_RXD";
debug_log.uartLog.UART.TXD.$suggestSolution = "UART0_TXD";
ospi_flash_io.syscfg
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "AM243x_ALX_beta" --package "ALX" --part "ALX" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM243x@09.02.01"
* @versions {"tool":"1.20.0+3587"}
*/
/**
* Import the modules used in this configuration.
*/
const flash = scripting.addModule("/board/flash/flash", {}, false);
const flash1 = flash.addInstance();
const clock = scripting.addModule("/kernel/dpl/clock");
const debug_log = scripting.addModule("/kernel/dpl/debug_log");
const mpu_armv7 = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
const mpu_armv71 = mpu_armv7.addInstance();
const mpu_armv72 = mpu_armv7.addInstance();
const mpu_armv73 = mpu_armv7.addInstance();
const mpu_armv74 = mpu_armv7.addInstance();
const default_linker = scripting.addModule("/memory_configurator/default_linker", {}, false);
const default_linker1 = default_linker.addInstance();
const general = scripting.addModule("/memory_configurator/general", {}, false);
const general1 = general.addInstance();
const region = scripting.addModule("/memory_configurator/region", {}, false);
const region1 = region.addInstance();
const section = scripting.addModule("/memory_configurator/section", {}, false);
const section1 = section.addInstance();
const section2 = section.addInstance();
const section3 = section.addInstance();
const section4 = section.addInstance();
const section5 = section.addInstance();
const section6 = section.addInstance();
const section7 = section.addInstance();
const section8 = section.addInstance();
const section9 = section.addInstance();
const section10 = section.addInstance();
const section11 = section.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
flash1.$name = "CONFIG_FLASH0";
flash1.flashSize = 16777216;
flash1.flashManfId = "0x9D";
flash1.flashDeviceId = "0x6018";
flash1.flashBlockSize = 65536;
flash1.cmdBlockErase4B = "0xD8";
flash1.cmdSectorErase4B = "0x20";
flash1.flashQeType = "2";
flash1.dummy_cfgReg = "0x00000000";
flash1.resetType = "0x30";
flash1.idNumBytes = 5;
flash1.dummyId8 = 0;
flash1.fourByteEnableSeq = "0xA9";
flash1.flashDeviceBusyTimeout = 36000000;
flash1.flashPageProgTimeout = 200;
flash1.device = "CUSTOM_FLASH";
flash1.fname = "IS25LP128F";
flash1.dummy_isAddrReg = false;
flash1.dummy_cmdRegWr = "0x63";
flash1.dummy_cmdRegRd = "0x61";
flash1.addressByteSupport = "2";
flash1.flash444Seq = "0x04";
flash1.protocol = "4s_4s_4s";
flash1.dummy_mask = "0xff";
flash1.proto_cmdRegRd = "0x16";
flash1.proto_cmdRegWr = "0x18";
flash1.proto_bitP = 1;
flash1.proto_shift = 7;
flash1.proto_mask = "0x80";
flash1.cmdRd = "0xEB";
flash1.dummy_bitP = 0;
flash1.modeClksRd = 0;
flash1.dummyClksRd = 6;
flash1.peripheralDriver.$name = "CONFIG_OSPI0";
flash1.peripheralDriver.inputClkFreq = 100000000;
flash1.peripheralDriver.dmaEnable = true;
flash1.peripheralDriver.phyEnable = true;
const udma = scripting.addModule("/drivers/udma/udma", {}, false);
const udma1 = udma.addInstance({}, false);
udma1.$name = "CONFIG_UDMA0";
flash1.peripheralDriver.udmaDriver = udma1;
udma1.udmaBlkCopyChannel.create(1);
udma1.udmaBlkCopyChannel[0].$name = "CONFIG_UDMA_BLKCOPY_CH0";
debug_log.enableUartLog = true;
debug_log.uartLog.$name = "CONFIG_UART_LOG";
debug_log.uartLog.UART.$assign = "USART5";
debug_log.uartLog.UART.RXD.rx = false;
debug_log.uartLog.UART.RXD.$used = false;
const uart_v0_template = scripting.addModule("/drivers/uart/v0/uart_v0_template", {}, false);
const uart_v0_template1 = uart_v0_template.addInstance({}, false);
uart_v0_template1.$name = "drivers_uart_v0_uart_v0_template0";
debug_log.uartLog.child = uart_v0_template1;
mpu_armv71.$name = "CONFIG_MPU_REGION0";
mpu_armv71.size = 31;
mpu_armv71.attributes = "Device";
mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
mpu_armv71.allowExecute = false;
mpu_armv72.$name = "CONFIG_MPU_REGION1";
mpu_armv72.size = 15;
mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
mpu_armv73.$name = "CONFIG_MPU_REGION2";
mpu_armv73.baseAddr = 0x41010000;
mpu_armv73.size = 15;
mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
mpu_armv74.$name = "CONFIG_MPU_REGION3";
mpu_armv74.baseAddr = 0x70000000;
mpu_armv74.size = 21;
mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
default_linker1.$name = "memory_configurator_default_linker0";
general1.$name = "CONFIG_GENERAL0";
general1.linker.$name = "TIARMCLANG0";
region1.$name = "MEMORY_REGION_CONFIGURATION0";
region1.memory_region.create(9);
region1.memory_region[0].type = "TCMA_R5F";
region1.memory_region[0].$name = "R5F_VECS";
region1.memory_region[0].size = 0x40;
region1.memory_region[0].auto = false;
region1.memory_region[1].type = "TCMA_R5F";
region1.memory_region[1].$name = "R5F_TCMA";
region1.memory_region[1].size = 0x7FC0;
region1.memory_region[2].type = "TCMB_R5F";
region1.memory_region[2].$name = "R5F_TCMB0";
region1.memory_region[2].size = 0x8000;
region1.memory_region[3].$name = "NON_CACHE_MEM";
region1.memory_region[3].auto = false;
region1.memory_region[3].manualStartAddress = 0x70060000;
region1.memory_region[3].size = 0x8000;
region1.memory_region[4].$name = "MSRAM";
region1.memory_region[4].auto = false;
region1.memory_region[4].manualStartAddress = 0x70080000;
region1.memory_region[4].size = 0x40000;
region1.memory_region[5].type = "FLASH";
region1.memory_region[5].$name = "FLASH";
region1.memory_region[5].auto = false;
region1.memory_region[5].manualStartAddress = 0x60100000;
region1.memory_region[5].size = 0x80000;
region1.memory_region[6].$name = "USER_SHM_MEM";
region1.memory_region[6].auto = false;
region1.memory_region[6].manualStartAddress = 0x701D0000;
region1.memory_region[6].size = 0x180;
region1.memory_region[6].isShared = true;
region1.memory_region[6].shared_cores = ["m4fss0-0","r5fss0-1","r5fss1-0","r5fss1-1"];
region1.memory_region[7].auto = false;
region1.memory_region[7].manualStartAddress = 0x701D0180;
region1.memory_region[7].size = 0x3E80;
region1.memory_region[7].$name = "LOG_SHM_MEM";
region1.memory_region[7].isShared = true;
region1.memory_region[7].shared_cores = ["m4fss0-0","r5fss0-1","r5fss1-0","r5fss1-1"];
region1.memory_region[8].auto = false;
region1.memory_region[8].manualStartAddress = 0x701D4000;
region1.memory_region[8].size = 0xC000;
region1.memory_region[8].$name = "RTOS_NORTOS_IPC_SHM_MEM";
region1.memory_region[8].isShared = true;
region1.memory_region[8].shared_cores = ["m4fss0-0","r5fss0-1","r5fss1-0","r5fss1-1"];
section1.$name = "Vector Table";
section1.load_memory = "R5F_VECS";
section1.group = false;
section1.output_section.create(1);
section1.output_section[0].$name = ".vectors";
section1.output_section[0].palignment = true;
section2.$name = "Text Segments";
section2.load_memory = "MSRAM";
section2.output_section.create(5);
section2.output_section[0].$name = ".text.hwi";
section2.output_section[0].palignment = true;
section2.output_section[1].$name = ".text.cache";
section2.output_section[1].palignment = true;
section2.output_section[2].$name = ".text.mpu";
section2.output_section[2].palignment = true;
section2.output_section[3].$name = ".text.boot";
section2.output_section[3].palignment = true;
section2.output_section[4].$name = ".text:abort";
section2.output_section[4].palignment = true;
section3.$name = "Code and Read-Only Data";
section3.load_memory = "MSRAM";
section3.output_section.create(2);
section3.output_section[0].$name = ".text";
section3.output_section[0].palignment = true;
section3.output_section[1].$name = ".rodata";
section3.output_section[1].palignment = true;
section4.$name = "Data Segment";
section4.load_memory = "MSRAM";
section4.output_section.create(1);
section4.output_section[0].$name = ".data";
section4.output_section[0].palignment = true;
section5.$name = "Memory Segments";
section5.load_memory = "MSRAM";
section5.output_section.create(3);
section5.output_section[0].$name = ".bss";
section5.output_section[0].palignment = true;
section5.output_section[0].output_sections_start = "__BSS_START";
section5.output_section[0].output_sections_end = "__BSS_END";
section5.output_section[1].$name = ".sysmem";
section5.output_section[1].palignment = true;
section5.output_section[2].$name = ".stack";
section5.output_section[2].palignment = true;
section6.$name = "Stack Segments";
section6.load_memory = "MSRAM";
section6.output_section.create(5);
section6.output_section[0].$name = ".irqstack";
section6.output_section[0].output_sections_start = "__IRQ_STACK_START";
section6.output_section[0].output_sections_end = "__IRQ_STACK_END";
section6.output_section[0].input_section.create(1);
section6.output_section[0].input_section[0].$name = ". = . + __IRQ_STACK_SIZE;";
section6.output_section[1].$name = ".fiqstack";
section6.output_section[1].output_sections_start = "__FIQ_STACK_START";
section6.output_section[1].output_sections_end = "__FIQ_STACK_END";
section6.output_section[1].input_section.create(1);
section6.output_section[1].input_section[0].$name = ". = . + __FIQ_STACK_SIZE;";
section6.output_section[2].$name = ".svcstack";
section6.output_section[2].output_sections_start = "__SVC_STACK_START";
section6.output_section[2].output_sections_end = "__SVC_STACK_END";
section6.output_section[2].input_section.create(1);
section6.output_section[2].input_section[0].$name = ". = . + __SVC_STACK_SIZE;";
section6.output_section[3].$name = ".abortstack";
section6.output_section[3].output_sections_start = "__ABORT_STACK_START";
section6.output_section[3].output_sections_end = "__ABORT_STACK_END";
section6.output_section[3].input_section.create(1);
section6.output_section[3].input_section[0].$name = ". = . + __ABORT_STACK_SIZE;";
section6.output_section[4].$name = ".undefinedstack";
section6.output_section[4].output_sections_start = "__UNDEFINED_STACK_START";
section6.output_section[4].output_sections_end = "__UNDEFINED_STACK_END";
section6.output_section[4].input_section.create(1);
section6.output_section[4].input_section[0].$name = ". = . + __UNDEFINED_STACK_SIZE;";
section7.$name = "Initialization and Exception Handling";
section7.load_memory = "MSRAM";
section7.output_section.create(3);
section7.output_section[0].$name = ".ARM.exidx";
section7.output_section[0].palignment = true;
section7.output_section[1].$name = ".init_array";
section7.output_section[1].palignment = true;
section7.output_section[2].$name = ".fini_array";
section7.output_section[2].palignment = true;
section8.$name = "User Shared Memory";
section8.type = "NOLOAD";
section8.load_memory = "USER_SHM_MEM";
section8.group = false;
section8.output_section.create(1);
section8.output_section[0].$name = ".bss.user_shared_mem";
section8.output_section[0].alignment = 0;
section9.$name = "Log Shared Memory";
section9.load_memory = "LOG_SHM_MEM";
section9.type = "NOLOAD";
section9.group = false;
section9.output_section.create(1);
section9.output_section[0].$name = ".bss.log_shared_mem";
section9.output_section[0].alignment = 0;
section10.$name = "IPC Shared Memory";
section10.type = "NOLOAD";
section10.load_memory = "RTOS_NORTOS_IPC_SHM_MEM";
section10.group = false;
section10.output_section.create(1);
section10.output_section[0].$name = ".bss.ipc_vring_mem";
section10.output_section[0].alignment = 0;
section11.$name = "Non Cacheable Memory";
section11.load_memory = "NON_CACHE_MEM";
section11.group = false;
section11.type = "NOLOAD";
section11.output_section.create(1);
section11.output_section[0].$name = ".bss.nocache";
section11.output_section[0].alignment = 0;
/**
* Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
* re-solve from scratch.
*/
flash1.peripheralDriver.OSPI.$suggestSolution = "OSPI0";
flash1.peripheralDriver.OSPI.CLK.$suggestSolution = "OSPI0_CLK";
flash1.peripheralDriver.OSPI.CSn0.$suggestSolution = "OSPI0_CSn0";
flash1.peripheralDriver.OSPI.D3.$suggestSolution = "OSPI0_D3";
flash1.peripheralDriver.OSPI.D2.$suggestSolution = "OSPI0_D2";
flash1.peripheralDriver.OSPI.D1.$suggestSolution = "OSPI0_D1";
flash1.peripheralDriver.OSPI.D0.$suggestSolution = "OSPI0_D0";
debug_log.uartLog.UART.TXD.$suggestSolution = "MCAN1_RX";
Dear Jinliang.
please let us know if you still need support.
we will close this ticket.
thanks a lot!
yong
Hello,
This issue has not been resolved yet. We have temporarily disabled verification to allow the firmware to load normally.
If there is a solution, please let us know.
搜索
复制
Dear Jinliang.
as found by Prashant, The reason of the failure is "Issue with Hash operation". This is possibly because of the PKTDMA read incompatibility with the custom OSPI flash in DAC mode.
then I found the replied as below.
may I ask your help to clarify the status? and also help make clear below items?
1. on which board? LP_AM243 or your board?
2. PHY enable or not?
3. DAC mode is enable or not?
thanks a lot!
yong
The response was a problem that occurred during testing when the flash chip was replaced on the LP-AM243 development board, due to poor signal quality of the flash connected to the fly wire and failed PHY mode initialization.
At present, the latest status is on our board. During the SBL startup process, the firmware verification failed, the PHY was disabled, and the DAC was enabled.
Dear Jinliang.
per request, please help check if enable PHY and have a try to continue the investigation.
thanks a lot!
yong