Hi aurixuser,
Many thanks for your reply. I tried straightaway, then got diverted off. But back on the topic again now.
Yes, I've tried the Infineon XMC Flasher, with same results. I can see that the Flasher just launches J-Flash, with the 4 blue progress bars across the screen. Flasher says everything has programmed and verified OK. With Flasher, I've also tried an Erase before programming, and Verify command after, and all reports OK. I'm using the latest J-Flash, 6.16f, and Flasher even prompted to update the J-Flash firmware, which I OK'd. I'm also using the latest Java JRE runtime, jre-8u131-windows-x64. I updated to the latest, per the release notes for Flasher.
I've also tried J-Flash Lite, directly.
And of course, as launched by DAVE 4.3.2.
I've also tried the latest Infineon Memtool 4 (4.07.03 Build 4708 Frontend version 1.19.3 Server version 1.33.5), but got stuck at the dialogue titled 'Create or use default'. Apologies, I would attach, but I don't think I have enough Forum points yet, to be allowed to..
So, under XMC4300, I chose 'Use a default target configuration', then XMC4300, which is what we're using, then a choice of:
Starter Kits (Bootstrap Loader), and Infineon XMC4300 Relax Kit with XMC4300-F100x256 (BSL/ASC), and
Starter Kits (Bootstrap Loader), and Infineon XMC4300 Relax Kit with XMC4300-F100x256 (DAS)
I don't know what BSL/ASC or DAS are, so was stuck here. I will try and google.
Anyway, neither worked. They both reported a series of errors, saying 'Can't establish Connection to Target':
Message from component 'IMTMemtool' :
Can't connect to Target
Message from component 'CortexJtagIntf' :
Can't connect target !
Message from component 'CortexJtagIntf' :
Failed to connect target device !
The Change.. Target Interface Setup didn't give me any ungreyed options that matched the XMC Link SEGGER J-Link based probe we are using.
I also tried, the 'Create a new target configuration step by step' option. But that failed, just after it offered to add something named a 'UDE Add-In'.
It failed with these errors:
Message from component 'IMTMemtool' :
Component initialisation failed !
Message from component 'IMTMemtool' :
No core available for FLASH programming !
As mentioned, our project started life, as the Infineon example poject, for Modbus RTU.
In DAVE, I have Build Configurations > Set Active > Release, selected presently. As such, the project root, says 'Project [ Active - Release ]'. In Properties > Run/Debug Settings, I see a single entry, with the name 'Project Release'. If I click Edit.., to view its settings, I see on the Startup tab, it has 'Initial Reset and Halt'. Is that right, and intended? Is that the problem?
If I delete the 'Project Release' entry, and create a New one, or click the 'Restore Default' button, the same is true. So I imagine DAVE thinks the mentioned settings, are what is appropriate by default, for a release build.
Under Runtime Options, 'RAM application (reload after each reset/restart)', is unchecked. That pretty much describes, the behaviour we see. I wonder, is there perhaps a bug in DAVE, that has that checkbox, reversed ?
When I build our project, with Build Configurations > Set Active > Release selected, it comes out as 62896 bytes. With Build Configurations > Set Active > Debug selected, to comes out as 92032 bytes. Full optimisation (-O3), is selected presently for both.
So I'm fairly sure the release build, omits debug code.
In DAVE, with Build Configurations > Set Active > Release selected, if I click the DAVE toolbar Run button (green circled white triangle), the application downloads to our board, with the usual 4 blue progress bars, although they complete in a fraction of a second. Then, the following is reported:
SEGGER J-Link GDB Server V6.12j - Terminal output channel
Connection closed by the GDB Server.
Do you know, is that good? bad? normal?
The application seems to run, which I presume, means good. And I can close DAVE, and it carries on running, which is an improvement on what I was seeing originally.
However, if I powercycle our board, then our application software doesn't start. Completely dead, no startup LED transitions. So I don't think it it crashing. It is just, not starting.
Below, BTW, is what we see on-screen, when I click the DAVE Debug button (Beetle). Can you spot anything awry, in the following, maybe?
I am wondering, for example, whether an 0x0C000000 start, for our application, looks OK? Correct me if incorrect, but I heard that 0x0C000000 is non-cached FLASH, whereas 0x0800000 is cached FLASH. Perhaps one works, and the other doesn't, for application startup. But we would have inherited that, from the DAVE example project for Modbus RTU. And I don't know how one would go about changing, that.
SEGGER J-Link GDB Server V6.12j Command Line Version
JLinkARM.dll V6.12j (DLL compiled Feb 15 2017 18:01:10)
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: XMC4300-F100x256
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link Lite-XMC4200 Rev.1 compiled Apr 5 2017 11:59:07
Hardware: V1.00
S/N: 599000558
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0x2000FF3C)
Read 2 bytes @ address 0x00000000 (Data = 0xFF3C)
Target interface speed set to 1000 kHz
Resetting target
Halting target CPU...
...Target halted (PC = 0x08000200)
R0 = E000ED08, R1 = 00000263, R2 = 02000080, R3 = C8000201
R4 = 00000536, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 0C000004, R10= 00000000, R11= 00000000
R12= 00000000, R13= 1FFF0800, MSP= 1FFF0800, PSP= 00000000
R14(LR) = 000000ED, R15(PC) = 08000200
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x08000200 (Data = 0xD074F8DF)
Read 2 bytes @ address 0x08000200 (Data = 0xF8DF)
Select auto target interface speed (1875 kHz)
Flash breakpoints enabled
Read 4 bytes @ address 0x08000200 (Data = 0xD074F8DF)
Downloading 668 bytes @ address 0x0C000000 - Verified OK
Downloading 4096 bytes @ address 0x0C020000 - Verified OK
Downloading 4096 bytes @ address 0x0C021000 - Verified OK
Downloading 4096 bytes @ address 0x0C022000 - Verified OK
Downloading 4096 bytes @ address 0x0C023000 - Verified OK
Downloading 4096 bytes @ address 0x0C024000 - Verified OK
Downloading 4096 bytes @ address 0x0C025000 - Verified OK
Downloading 4096 bytes @ address 0x0C026000 - Verified OK
Downloading 4096 bytes @ address 0x0C027000 - Verified OK
Downloading 4096 bytes @ address 0x0C028000 - Verified OK
Downloading 4096 bytes @ address 0x0C029000 - Verified OK
Downloading 4096 bytes @ address 0x0C02A000 - Verified OK
Downloading 4096 bytes @ address 0x0C02B000 - Verified OK
Downloading 4096 bytes @ address 0x0C02C000 - Verified OK
Downloading 4096 bytes @ address 0x0C02D000 - Verified OK
Downloading 4096 bytes @ address 0x0C02E000 - Verified OK
Downloading 4096 bytes @ address 0x0C02F000 - Verified OK
Downloading 4096 bytes @ address 0x0C030000 - Verified OK
Downloading 4096 bytes @ address 0x0C031000 - Verified OK
Downloading 4096 bytes @ address 0x0C032000 - Verified OK
Downloading 4096 bytes @ address 0x0C033000 - Verified OK
Downloading 4096 bytes @ address 0x0C034000 - Verified OK
Downloading 4096 bytes @ address 0x0C035000 - Verified OK
Downloading 1252 bytes @ address 0x0C036000 - Verified OK
Downloading 3696 bytes @ address 0x0C0364E4 - Verified OK
Read 4 bytes @ address 0x08000200 (Data = 0xD074F8DF)
Resetting target
Halting target CPU...
...Target halted (PC = 0x08000200)
Read 2 bytes @ address 0x08031CFC (Data = 0xE92D)
R0 = E000ED08, R1 = 00000263, R2 = 02000080, R3 = C8000201
R4 = 00000536, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 0C000004, R10= 00000000, R11= 00000000
R12= 00000000, R13= 1FFF0800, MSP= 1FFF0800, PSP= 00000000
R14(LR) = 000000ED, R15(PC) = 08000200
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x08000200 (Data = 0xD074F8DF)
Setting breakpoint @ address 0x08031CFC, Size = 2, BPHandle = 0x0001
Starting target CPU...
...Breakpoint reached @ address 0x08031CFC
Reading all registers
Read 4 bytes @ address 0x08031CFC (Data = 0x4FF0E92D)
Removing breakpoint @ address 0x08031CFC, Size = 2
Reading 64 bytes @ address 0x08031CC0
Reading 64 bytes @ address 0x08031D00
Reading 64 bytes @ address 0x08031D40
Reading 64 bytes @ address 0x08031D80
Read 2 bytes @ address 0x1FFF07D6 (Data = 0x0101)
Read 2 bytes @ address 0x1FFF07D6 (Data = 0x0101)
So, lots of things it could be. I can make a start on trying all the permutations. But it would be very much a blind investigation. It would be good to know how things are 'supposed' to be..
..I've worked with quite a few CPUs, from a few different vendors, and I must admit, I am struggling to understand why this most basic of operations, a Release build, doesn't just, well, work..!
Appreciating any insights aurixuser, or anyone, might be able to offer..
Best regards,
David
Many thanks for your reply. I tried straightaway, then got diverted off. But back on the topic again now.
Yes, I've tried the Infineon XMC Flasher, with same results. I can see that the Flasher just launches J-Flash, with the 4 blue progress bars across the screen. Flasher says everything has programmed and verified OK. With Flasher, I've also tried an Erase before programming, and Verify command after, and all reports OK. I'm using the latest J-Flash, 6.16f, and Flasher even prompted to update the J-Flash firmware, which I OK'd. I'm also using the latest Java JRE runtime, jre-8u131-windows-x64. I updated to the latest, per the release notes for Flasher.
I've also tried J-Flash Lite, directly.
And of course, as launched by DAVE 4.3.2.
I've also tried the latest Infineon Memtool 4 (4.07.03 Build 4708 Frontend version 1.19.3 Server version 1.33.5), but got stuck at the dialogue titled 'Create or use default'. Apologies, I would attach, but I don't think I have enough Forum points yet, to be allowed to..
So, under XMC4300, I chose 'Use a default target configuration', then XMC4300, which is what we're using, then a choice of:
Starter Kits (Bootstrap Loader), and Infineon XMC4300 Relax Kit with XMC4300-F100x256 (BSL/ASC), and
Starter Kits (Bootstrap Loader), and Infineon XMC4300 Relax Kit with XMC4300-F100x256 (DAS)
I don't know what BSL/ASC or DAS are, so was stuck here. I will try and google.
Anyway, neither worked. They both reported a series of errors, saying 'Can't establish Connection to Target':
Message from component 'IMTMemtool' :
Can't connect to Target
Message from component 'CortexJtagIntf' :
Can't connect target !
Message from component 'CortexJtagIntf' :
Failed to connect target device !
The Change.. Target Interface Setup didn't give me any ungreyed options that matched the XMC Link SEGGER J-Link based probe we are using.
I also tried, the 'Create a new target configuration step by step' option. But that failed, just after it offered to add something named a 'UDE Add-In'.
It failed with these errors:
Message from component 'IMTMemtool' :
Component initialisation failed !
Message from component 'IMTMemtool' :
No core available for FLASH programming !
As mentioned, our project started life, as the Infineon example poject, for Modbus RTU.
In DAVE, I have Build Configurations > Set Active > Release, selected presently. As such, the project root, says 'Project [ Active - Release ]'. In Properties > Run/Debug Settings, I see a single entry, with the name 'Project Release'. If I click Edit.., to view its settings, I see on the Startup tab, it has 'Initial Reset and Halt'. Is that right, and intended? Is that the problem?
If I delete the 'Project Release' entry, and create a New one, or click the 'Restore Default' button, the same is true. So I imagine DAVE thinks the mentioned settings, are what is appropriate by default, for a release build.
Under Runtime Options, 'RAM application (reload after each reset/restart)', is unchecked. That pretty much describes, the behaviour we see. I wonder, is there perhaps a bug in DAVE, that has that checkbox, reversed ?
When I build our project, with Build Configurations > Set Active > Release selected, it comes out as 62896 bytes. With Build Configurations > Set Active > Debug selected, to comes out as 92032 bytes. Full optimisation (-O3), is selected presently for both.
So I'm fairly sure the release build, omits debug code.
In DAVE, with Build Configurations > Set Active > Release selected, if I click the DAVE toolbar Run button (green circled white triangle), the application downloads to our board, with the usual 4 blue progress bars, although they complete in a fraction of a second. Then, the following is reported:
SEGGER J-Link GDB Server V6.12j - Terminal output channel
Connection closed by the GDB Server.
Do you know, is that good? bad? normal?
The application seems to run, which I presume, means good. And I can close DAVE, and it carries on running, which is an improvement on what I was seeing originally.
However, if I powercycle our board, then our application software doesn't start. Completely dead, no startup LED transitions. So I don't think it it crashing. It is just, not starting.
Below, BTW, is what we see on-screen, when I click the DAVE Debug button (Beetle). Can you spot anything awry, in the following, maybe?
I am wondering, for example, whether an 0x0C000000 start, for our application, looks OK? Correct me if incorrect, but I heard that 0x0C000000 is non-cached FLASH, whereas 0x0800000 is cached FLASH. Perhaps one works, and the other doesn't, for application startup. But we would have inherited that, from the DAVE example project for Modbus RTU. And I don't know how one would go about changing, that.
SEGGER J-Link GDB Server V6.12j Command Line Version
JLinkARM.dll V6.12j (DLL compiled Feb 15 2017 18:01:10)
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: XMC4300-F100x256
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link Lite-XMC4200 Rev.1 compiled Apr 5 2017 11:59:07
Hardware: V1.00
S/N: 599000558
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0x2000FF3C)
Read 2 bytes @ address 0x00000000 (Data = 0xFF3C)
Target interface speed set to 1000 kHz
Resetting target
Halting target CPU...
...Target halted (PC = 0x08000200)
R0 = E000ED08, R1 = 00000263, R2 = 02000080, R3 = C8000201
R4 = 00000536, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 0C000004, R10= 00000000, R11= 00000000
R12= 00000000, R13= 1FFF0800, MSP= 1FFF0800, PSP= 00000000
R14(LR) = 000000ED, R15(PC) = 08000200
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x08000200 (Data = 0xD074F8DF)
Read 2 bytes @ address 0x08000200 (Data = 0xF8DF)
Select auto target interface speed (1875 kHz)
Flash breakpoints enabled
Read 4 bytes @ address 0x08000200 (Data = 0xD074F8DF)
Downloading 668 bytes @ address 0x0C000000 - Verified OK
Downloading 4096 bytes @ address 0x0C020000 - Verified OK
Downloading 4096 bytes @ address 0x0C021000 - Verified OK
Downloading 4096 bytes @ address 0x0C022000 - Verified OK
Downloading 4096 bytes @ address 0x0C023000 - Verified OK
Downloading 4096 bytes @ address 0x0C024000 - Verified OK
Downloading 4096 bytes @ address 0x0C025000 - Verified OK
Downloading 4096 bytes @ address 0x0C026000 - Verified OK
Downloading 4096 bytes @ address 0x0C027000 - Verified OK
Downloading 4096 bytes @ address 0x0C028000 - Verified OK
Downloading 4096 bytes @ address 0x0C029000 - Verified OK
Downloading 4096 bytes @ address 0x0C02A000 - Verified OK
Downloading 4096 bytes @ address 0x0C02B000 - Verified OK
Downloading 4096 bytes @ address 0x0C02C000 - Verified OK
Downloading 4096 bytes @ address 0x0C02D000 - Verified OK
Downloading 4096 bytes @ address 0x0C02E000 - Verified OK
Downloading 4096 bytes @ address 0x0C02F000 - Verified OK
Downloading 4096 bytes @ address 0x0C030000 - Verified OK
Downloading 4096 bytes @ address 0x0C031000 - Verified OK
Downloading 4096 bytes @ address 0x0C032000 - Verified OK
Downloading 4096 bytes @ address 0x0C033000 - Verified OK
Downloading 4096 bytes @ address 0x0C034000 - Verified OK
Downloading 4096 bytes @ address 0x0C035000 - Verified OK
Downloading 1252 bytes @ address 0x0C036000 - Verified OK
Downloading 3696 bytes @ address 0x0C0364E4 - Verified OK
Read 4 bytes @ address 0x08000200 (Data = 0xD074F8DF)
Resetting target
Halting target CPU...
...Target halted (PC = 0x08000200)
Read 2 bytes @ address 0x08031CFC (Data = 0xE92D)
R0 = E000ED08, R1 = 00000263, R2 = 02000080, R3 = C8000201
R4 = 00000536, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 0C000004, R10= 00000000, R11= 00000000
R12= 00000000, R13= 1FFF0800, MSP= 1FFF0800, PSP= 00000000
R14(LR) = 000000ED, R15(PC) = 08000200
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x08000200 (Data = 0xD074F8DF)
Setting breakpoint @ address 0x08031CFC, Size = 2, BPHandle = 0x0001
Starting target CPU...
...Breakpoint reached @ address 0x08031CFC
Reading all registers
Read 4 bytes @ address 0x08031CFC (Data = 0x4FF0E92D)
Removing breakpoint @ address 0x08031CFC, Size = 2
Reading 64 bytes @ address 0x08031CC0
Reading 64 bytes @ address 0x08031D00
Reading 64 bytes @ address 0x08031D40
Reading 64 bytes @ address 0x08031D80
Read 2 bytes @ address 0x1FFF07D6 (Data = 0x0101)
Read 2 bytes @ address 0x1FFF07D6 (Data = 0x0101)
So, lots of things it could be. I can make a start on trying all the permutations. But it would be very much a blind investigation. It would be good to know how things are 'supposed' to be..
..I've worked with quite a few CPUs, from a few different vendors, and I must admit, I am struggling to understand why this most basic of operations, a Release build, doesn't just, well, work..!
Appreciating any insights aurixuser, or anyone, might be able to offer..
Best regards,
David