Hi
I am getting segmentation fault when building sb file. I built simple helloworld program using SDK Example and generated SREC file using binary Tools in MCUXpresso. I used the .s19 file generated as input to elftosb utility but following is error:
./elftosb -f imx -V -c program_flexspinor_image_hyperflash.bd -o evkmimxrt1170_freertos_hello_cm7.bin evkmimxrt1170_freertos_hello_cm7.s19
Section: 0x0
Segmentation fault (core dumped)
I followed this link. What can be the issue @jeremyzhou ?
已解决! 转到解答。
Hi,
Thanks for your reply.
Did you ever try using the Linux version of the tool to generate the sb file?
If not, please give it a try, then compare it with your command.
I also attached the elftosb for the Linux OS and you can try it.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi @razools ,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Actually, the above bd file is inappropriate to generate the bin, so please check the commands carefully in the link.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi @jeremyzhou
Thanks for your prompt reply. I am able to generate bin file if using imx-flexspinor-normal-unsigned.bd as is. As I am using IMXRT1176 adn Flash address starts from 0x30000000 rather than 0x60000000. As soon as i change my start address to 0x30000000, I get Segmentation fault (core dumped)
My bd file looks like
options {
flags = 0x00;
startAddress = 0x30000000;
ivtOffset = 0x1000;
initialLoadSize = 0x2000;
//DCDFilePath = "dcd.bin";
# Note: This is required if the default entrypoint is not the Reset_Handler
# Please set the entryPointAddress to Reset_Handler address
// entryPointAddress = 0x60002411;
}
sources {
elfFile = extern(0);
}
section (0)
{
}
while imx-flexspinor-normal-unsigned.bd (that doesn't creates segmentation fault) is
options {
flags = 0x00;
startAddress = 0x30000000;
ivtOffset = 0x1000;
initialLoadSize = 0x2000;
//DCDFilePath = "dcd.bin";
# Note: This is required if the default entrypoint is not the Reset_Handler
# Please set the entryPointAddress to Reset_Handler address
// entryPointAddress = 0x30002000;
}
sources {
elfFile = extern(0);
}
section (0)
{
}
and my elftosb version is
elftosb 4.0.0
Copyright (c) 2004-2015 Freescale Semiconductor, Inc.
All rights reserved.
Any ideas what can be the issue ?
I just tried elftosb version 5.1.18. same results. As soon as i change my startAddress from 0x30000000 to 0x60000000, it works.
@jeremyzhou can you point me out what could be the reason and probable fix ?
Hi @razools
Thanks for your reply.
Please illustrates the steps of generating evkmimxrt1170_freertos_hello_cm7.s19, further, you can try to use the GUI tool instead of typing commands manually.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Thanks @jeremyzhou
The GUI Tool works fine. I am able to generate bin file. Using the newly generated nopadding.bin file, I am able to create sb file.
For generation image using Linux OS i am following this link and following are my steps
Following is the error output i am getting on Linux
./elftosb -f kinetis -V -c program_flexspinor_image_hyperflash.bd -o evkmimxrt1170_freertos_hello_cm7.sb evkmimxrt1170_freertos_hello_cm7_nopadding.bin
Segmentation fault (core dumped)
While on windows its is successful
./elftosb.exe -f kinetis -V -c program_flexspinor_image_hyperflash.bd -o evkmimxrt1170_freertos_hello_cm7.sb evkmimxrt1170_freertos_hello_cm7_nopadding.bin
Boot Section 0x00000000:
FILL | adr=0x00002000 | len=0x00000004 | ptn=0xc0233007
ENA | adr=0x00002000 | cnt=0x00000004 | flg=0x0900
ERAS | adr=0x30000000 | cnt=0x01000000 | flg=0x0000
FILL | adr=0x00003000 | len=0x00000004 | ptn=0xf000000f
ENA | adr=0x00003000 | cnt=0x00000004 | flg=0x0900
LOAD | adr=0x30001000 | len=0x0002e5e4 | crc=0x8e62122b | flg=0x0000
What can be the issue with elftosb in Linux version ?
Hi,
Thanks for your reply.
Did you ever try using the Linux version of the tool to generate the sb file?
If not, please give it a try, then compare it with your command.
I also attached the elftosb for the Linux OS and you can try it.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------