Hi,
I would like to automate some things like flashing firmware, memory erase, uC reset and alike, for my microcontroller by using jlink.
I have a custom bord with the following hardware configuration:
GitHub - square/pylink: Python Library for device debugging/programming via J-Link - github pylink library repository
With my microcontroller, the type of memory and its configuration, it was stated that custom flash loader is required to allow jlink to perform operations on the memory that is connected to the microcontroller via Hyperbus interface.
I have custom device configuration definition and jlink compatible .FLM flash loader file that I can use via jlink commander tool - write/read/erase work without any issue, I can also debug the code from non-volatile memory without any issues.
The problem I have is that pylink can't find the device when I execute jlink.connect method. I assume it is due to the fact that my flashloader is external to what is normally included in the jlink software by default and for some reason built-in ARM DLL does not find the device configuration I added.
See attached image for reference:
Index is -1 which suggests it was not found.
From the pylink python code I see that it fetches device configuration that is based on the index (that is probably where all the connection magic happens). Unfortunately for me, the index is not found as you can see on the image above.
My guess is that the entire jlink architecture was made this way to be flexible and allow customization, hence the possibility to add and configure custom devices/targets with custom flash loader. Maybe I'm doing something wrong here, or pylink just does not support external flash loaders.
Maybe it executes incorrect methods/functions from the DLL - hard to tell from my perspective.
The questions:
Best regards,
Michal
I would like to automate some things like flashing firmware, memory erase, uC reset and alike, for my microcontroller by using jlink.
I have a custom bord with the following hardware configuration:
- microcontroller: NXP IMXRT1176
- external memory: Infineon Hyperflash S26HL512T with Hyperbus configuration
GitHub - square/pylink: Python Library for device debugging/programming via J-Link - github pylink library repository
With my microcontroller, the type of memory and its configuration, it was stated that custom flash loader is required to allow jlink to perform operations on the memory that is connected to the microcontroller via Hyperbus interface.
I have custom device configuration definition and jlink compatible .FLM flash loader file that I can use via jlink commander tool - write/read/erase work without any issue, I can also debug the code from non-volatile memory without any issues.
The problem I have is that pylink can't find the device when I execute jlink.connect method. I assume it is due to the fact that my flashloader is external to what is normally included in the jlink software by default and for some reason built-in ARM DLL does not find the device configuration I added.
See attached image for reference:
Index is -1 which suggests it was not found.
From the pylink python code I see that it fetches device configuration that is based on the index (that is probably where all the connection magic happens). Unfortunately for me, the index is not found as you can see on the image above.
My guess is that the entire jlink architecture was made this way to be flexible and allow customization, hence the possibility to add and configure custom devices/targets with custom flash loader. Maybe I'm doing something wrong here, or pylink just does not support external flash loaders.
Maybe it executes incorrect methods/functions from the DLL - hard to tell from my perspective.
The questions:
- Do you know what is the procedure when it comes to custom flash loader and custom device configuration to be able to work with pylink library and jlink DLL?
- Is there a simple way to make it work in my case, and if so how?
Best regards,
Michal
The post was edited 1 time, last by mimlo ().