I am trying to make a remote lab so that students can program my lpc4088 from a website that I created. Students work in the µvision software.
In the laboratory this software uses the J-link device to download the program in the microcontroller but the file the microvision software sends to the downloader has the extention “.axf” and because the “loadfile” function doesn’t support this extension I don’t really get how this works.
On this site(segger.com/jlink-flash-download.html ) I found the following information:
In the manual of the J-link device I also found the loadfile function instead of the loadbin.
µvision can create a hex file on build which can be used by the “loadfile” function. The plan is that this file will be uploaded and downloaded into my server where it will be automatically downloaded into the microcontroller with the j-link device.
In a first step I tried to program the microcontroller directly from the j-link command window. I entered all the command as specified above and get a success message but the microcontroller is not working as it should. Is it possible that hex files are not compatible?
Any advice on how to fix this problem?
This are the in and outputs from my command line Jlink.exe:
In the laboratory this software uses the J-link device to download the program in the microcontroller but the file the microvision software sends to the downloader has the extention “.axf” and because the “loadfile” function doesn’t support this extension I don’t really get how this works.
On this site(segger.com/jlink-flash-download.html ) I found the following information:
J-Link Commander is a free command line utility for simple analysis of the target system with J-Link. J-Link Commander also allows downloads into flash memory of target systems.
How to perform downloading into flash via J-Link Commander:
- Connect J-Link to the PC.
- Connect target system to J-Link
- Start J-Link Commander.
- Type the following commands:
J-Link> device // For a list of known
devices, please refer to here
J-Link> speed
J-Link> r
J-Link> h
J-Link> loadbin ,- J-Link Commander executes the flash download and prints out the
time statistics on success.
In the manual of the J-link device I also found the loadfile function instead of the loadbin.
µvision can create a hex file on build which can be used by the “loadfile” function. The plan is that this file will be uploaded and downloaded into my server where it will be automatically downloaded into the microcontroller with the j-link device.
In a first step I tried to program the microcontroller directly from the j-link command window. I entered all the command as specified above and get a success message but the microcontroller is not working as it should. Is it possible that hex files are not compatible?
Any advice on how to fix this problem?
This are the in and outputs from my command line Jlink.exe:
C:\Users\Admin\Documents\Robin\JLink_V498d>jlink.exe
SEGGER J-Link Commander V4.98d ('?'for help)
Compiled Apr 28 2015 13:58:44
DLL version V4.98d, compiled Apr 28 201513:58:23
Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
Hardware: V8.00
S/N: 268006192
OEM: SEGGER-EDU
Feature(s): FlashBP, GDB
VTarget = 3.300V
Info: TotalIRLen = 4, IRPrint = 0x01
Info: Found Cortex-M4 r0p1, Little endian.
Info: FPUnit: 6 code (BP) slots and 2 literal slots
Info: CoreSight components:
Info: ROMTbl 0 @ E00FF000
Info: ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
Info: ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
Info: ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
Info: ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
Info: ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
Info: ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
Found 1 JTAG device, Total IRLen = 4:
#0 Id: 0x4BA00477, IRLen: 04, IRPrint: 0x1,CoreSight JTAG-DP (ARM)
Cortex-M4 identified.
Target interface speed: 100 kHz
J-Link>device lpc4088
Info: Device "LPC4088" selected.
Reconnecting to target...
Info: TotalIRLen = 4, IRPrint = 0x01
Info: Found Cortex-M4 r0p1, Little endian.
Info: FPUnit: 6 code (BP) slots and 2 literal slots
Info: CoreSight components:
Info: ROMTbl 0 @ E00FF000
Info: ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
Info: ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
Info: ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
Info: ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
Info: ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
Info: ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
J-Link>speed 2000
Target interface speed: 2000 kHz
J-Link>r
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
J-Link>h
PC = 000002AC, CycleCnt = 00000000
R0 = 00000000, R1 = 000002AD, R2 = 00000000, R3 = 00000000
R4 = 3456ABCD, R5 = 3456ABCD, R6 = 12345678, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
R12= 00000000
SP(R13)= 100010F0, MSP= 100010F0, PSP= 10000830, R14(LR) = 1FFF0483
XPSR = 61000000: APSR = nZCvq, EPSR = 01000000, IPSR = 000 (NoException)
CFBP = 00000000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
FPU regs: FPU not enabled / not implemented on connected CPU.
J-Link>loadfile C:\Users\Admin\Documents\Robin\pruebaC\Objects\pruebaC.hex
Downloading file [C:\Users\Admin\Documents\Robin\pruebaC\Objects\pruebaC.hex]...
Info: J-Link: Flash download: Flash programming performed for 1 range (4096 bytes)
Info: J-Link: Flash download: Total time needed: 0.254s (Prepare: 0.073s, Compar
e: 0.022s, Erase: 0.111s, Program: 0.037s, Verify: 0.000s, Restore: 0.007s)
O.K.
J-Link>
The post was edited 3 times, last by robbbin ().