Re-opening this issue since I didn't get any results from the last individual handling it.
See: https://community.nxp.com/t5/i-MX-Processors/build-debug-sh/m-p/1415502#M187151
I am trying to build Eval IMMXRT1176 Ethernet AVB demo as build_debug.sh and I get the following error: `itcm' overflowed by 55880 bytes. See attached log. What can I do to fix this issue. I do need the debug version. See attached NXP instruction manual on how to duplicate the environment.
Best regards,
Ulises
Hi,
Sorry for replying late.
Actually, I don't encounter the build issue after following the
NXP_GenAVB_TSN_MCUXpresso_User_s_Guide_3_3_rev1, you can see that I can generate the image.
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 @usala ,
Sorry for replying late.
Now I basic replicate the issue, I guess it's related to the linker file and it needs to use the SDRAM as the primary RAM.
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 @usala ,
Thanks for your reply.
After digging deeper, I work it out finially and please modify the linker file (~\genavb-apps-freertos-3_3_5\boards\evkmimxrt1170\demo_apps\avb_tsn\common\armgcc\MIMXRT1176xxxxx_cm7.ld) as the below figure shows.
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 Jeremy,
I made the change to the linker file and now it builds but the code is not running. I use SEGGER's Ozone to download the image as I have been doing for the build_release.sh but the debug image is not running. There is no print output to the shell terminal. Is there something else I need to do to get it to run?
Best regards,
Ulises
Hi @usala
Could you please share me the Ozone preject? The issue is maybe caused by a in-correct init sdram, so please check that if there is a Jlink-script be called when do the debug, maybe named evkmimxrt1170_connect_cm4_cm7side.jlinkscript, this one is used to init the sdram before run the code.
And also, in order to validate this, you can also change the boot option to the QSPI FLASH, and then debug the project with Ozone. If the hard-fault gone, we can verify that we need to add the evkmimxrt1170_connect_cm4_cm7side.jlinkscript into the Ozone project.
So please have a try first with the boot from the QSPI flash(0 0 1 0), then try to add the evkmimxrt1170_connect_cm4_cm7side.jlinkscript into the Ozone project.
BR,
Jeremy
Hi @usala ,
Please have a try on the attached Ozone-project.
Note( I am using the Jlink-v7.60b, and the Ozone v3.10g, to make sure there are no errors on the version, please re-configure the project before debugging the code):
1. Select the chips by clicking tools->J-Link Settings, then select our chip, mine is MIMXRT1176xxxA_M7:
2. Edit the IMXRT_1176.jdebug, and change the elf file to your path:
3. change the reset-type to Reset & Halt
We can debug our code then.
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 Jeremy,
I didn't receive any attachments from you. I hope you were referring to making changes to the original attachment I sent to you of my Ozone project. I tried your suggested changes and I am still getting the hard fault. My setup is as follows.
Ozone version V3.23 (Beta) 2021-06-14. This was the latest version at the time I installed it. I will get the same as your version and try it.
J-Link version 10.1. This is the version that came with the J_Link adapter and I don't know if it can be changed.
The code jumps to the function static void BusFault(uint32_t stack[]) in application_util.c and stays in the for(;;) loop indefinitely.
Hi Jeremy,
I have upgraded J-Link to v7.60b and Ozone to v3.26c. Ozone does not give you the option to pick it's download version as J-Link does. I tried these with your suggested project file changes and I still get the hard fault but with more details than in the previous version. I have enclosed the error log details as well as the new project file.
----------------------------------------------------------------------------------------------
The target stopped in HardFault exception state.
Reason: A fault with configurable priority has been escalated to a HardFault exception at 0x0000CADA.
For more information about analyzing faults on Cortex-M, refer to:
https://wiki.segger.com/Cortex-M_Fault.
Best regards,
Ulises
Hi Jeremy,
I am building the debug version using build_debug.sh. I I make the changes you have suggested and I build release it does not hard fault and I am able to set breakpoints in the disassemble window of Ozone. This is okay but ideally I will like to debug the c source code with the build_debug.sh.
Best regards,
Ulises
Hi @usala
Sorry for replying late.
1) Is there something else I need to do to get it to run?
-- It needs a bit weird, whether you ever try to program the generated boot image to the MIMXRT1170 EVK after clicking the build_release.sh.
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 Jeremy,
You need to connect the MIMXRT1176 eval to a terminal program like Tera-term on to the USB port next to the NXP logo on the PCB. 115200 BAUD to see the actual logs from the firmware running. After you build the build_debug.sh follow the steps in the manual on how to upload the build image onto the eval board. You need to set the dip switch to bootloader mode and them drop the bin file onto the pop up window generated by the boot loader. See 9.8. Flashing an image section on "NXP_GenAVB_TSN_MCUXpresso_User_s_Guide_3_3_rev1.pdf". If you build the build_release.sh the image produced will run normally and you'll see the logs on the terminal program, however if you build the build_debug.sh nothing is displayed on the terminal program as if not running at all. this is the issue.
Best regards,
Ulises
Hi,
Please comment out the below code lines in the startup_MIMXRT1176_cm7.S to avoid the FlexRAM assignment changes, then give it a try again.
/*
* FlexRAM setup
* Needs to be done before any usage of TCM memory.
* DTCM = 320 KB
* ITCM = 192 KB
* OCRAM = 0 KB
* Bank low 7 - 0
* DDDDDDDD
* Bank high 15 - 8
* DDIIIIII
*/
; .equ GPR17, 0x400E4044
; .equ GPR18, 0x400E4048
; .equ BANKCFGLOW, 0xAAAA
; .equ BANKCFGHIGH, 0xAFFF
; .equ MASK, 0xFFFF0000
; ldr r0, =GPR17
; ldr r1, [r0]
; ldr r2, =MASK
; and r1, r2
; ldr r2, =BANKCFGLOW
; orr r1, r2
; str r1, [r0]
; ldr r0, =GPR18
; ldr r1, [r0]
; ldr r2, =MASK
; and r1, r2
; ldr r2, =BANKCFGHIGH
; orr r1, r2
; str r1, [r0]
; /* ARM core ITCM/DTCM total size setup */
; /* Set ITCM/DTCM size to maximum supported, matching MPU mapping */
; .equ GPR16, 0x400E4040
; .equ TCMCFG, 0xAA07
; ldr r0, =GPR16
; ldr r1, [r0]
; mov r2, #0xFFFF00FF
; and r1, r2
; ldr r2, =TCMCFG
; orr r1, r2
; str r1, [r0]
BR,
Jeremy
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 @usala ,
Thanks for your clarification and I'll give it a test later.
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,
Sorry for the reply late and the AE team suggests you follow below steps to fix the issue.
1) Add two MACRO into the CMakeFiles to enable the SDRAM at the boot time.
2) Replace the old ld file with the attachment.3) After that, rebuild the project with either build_debug.sh or build_release.sh for testing.
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 Jeremy,
I added the 2 lines to CMakeList.txt (see attached files) and replace
Best regards,
Ulises