iMXRT: Error with External Mode

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

iMXRT: Error with External Mode

746件の閲覧回数
Sam_ECU
Contributor V

Hello,

I'm trying to connect to the iMXRT1062 over MCU-Link to run in external mode in Matlab with XCP Serial Interface.  I get the same issue on a custom board and the 1060-EVK over OpenSDA with the External Mode example.

Essentially I'm trying to connect to a running target. The aim is to calibrate using external mode over serial after flashing the device with MCU-Boot-Utility.

I set the device up as so (Com11 for MCU-Link):

Sam_ECU_0-1717262194278.png

I build the code and flash it to the board (over SDA with EVK and with MCU-Boot-Utility for the custom board).

When using the "Connect" function in Simulink it generates the error:

Sam_ECU_1-1717262502881.png

How do I fix the issue?

How is it recommended to tune a custom board with MBDT code in Simulink over XCP?

Regards,

Sam

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

602件の閲覧回数
stefancinipeanu
NXP Employee
NXP Employee

Hello @Sam_ECU 

Looking to the error you are encountering, my first question would be how did you generate the code to use external mode feature? Did you press first Build, Deploy & Start button and then trying to connect from external mode menu? If this is the case, you have to know that the normal build does not contain all the External Mode over XCP Serial protocol communication stack that has to run on the board.

To run External Mode, after you configured the XCP Serial communication interface setting from Target hardware resources menu <- Hardware Implementation tab, you have to press the Monitor & Tune button from RUN ON HARDWARE menu in the Simulink model, as in the picture below:

stefancinipeanu_1-1719826109964.png

When you press this button, all the XCP Serial communication interface sources will be added, compiled for your specific hardware and automatically downloaded on your 1062-EVK. Then, Simulink will automatically connect to the board and will display the logged signals in the Simulink scope in real-time.

Let me know if this works!

Regards!

Stefan.

0 件の賞賛
返信

354件の閲覧回数
Sam_ECU
Contributor V

Hello @stefancinipeanu 

I get further.

 

action: EXT_CONNECT
Connecting to the target...
Model status: 2
External mode structural checksum received from target: [0x47d3b38b, 0x33b32d2b, 0xadc1f171, 0x4ec70850].
Target integer only code: 0
Enabling XCP Synchronous Data Transfer...
External Mode Open Protocol Connect command failed
Caused by:
ERR packet with error code 'ERR_MEMORY_OVERFLOW' received in response to XCP command 'ALLOC_DAQ'. Target memory available for allocation to internal data structures is not sufficient. Set 'ExtModeAutomaticAllocSize' to 'on' or manually increase the target memory that is available for internal data structures. For details, see 'Customize XCP Software'.
Component:Simulink | Category:Model error

Embedded Coder is dumping all of the calibration and XCP information into SRAM_DTC:

Memory region Used Size Region Size %age Used
BOARD_FLASH: 472864 B 8 MB 5.64%
SRAM_DTC: 65572 B 128 KB 50.03%
SRAM_ITC: 0 GB 128 KB 0.00%
SRAM_OC: 0 GB 768 KB 0.00%
BOARD_SDRAM: 0 GB 30 MB 0.00%
NCACHE_REGION: 0 GB 2 MB

What would be the recommended RAM settings for an XCP / Calibration Project from NXP?

Is it just a matter of updating the linker scripts to increase the size of SRAM_DTC with text editor or MCUXpresso:

Sam_ECU_0-1724860689329.png

 

Sam_ECU_2-1724860752408.png


Regards,
Sam

0 件の賞賛
返信

84件の閲覧回数
Sam_ECU
Contributor V
0 件の賞賛
返信