75 views
in System Integration by

Hello EW-team,

I was working with STM32F746G DISCO board running a GUI project  created with EMbedded Wizard studio. I used STMPlatformpackage as mentioned in the documentation and able to run successfully on it. Also created STM32CubeIDE project and able to load on DISCO board

Now , the customized hardware has STM32F746ZE MicroController : 1MB Flash , 320KB RAM , with QSPI flash (128Mb) , SDRAM (128Mb) , 480x272 size LCD with RGB565 color format used. Hence I have used above DISCO board platform package as Template.

The customized hardware is already up and running with GUI and Application code (without Graphic framework). Here, I am trying to evaluate EW framework to create same screens. 

The change made to the platform package STM32F746G DISCO :

  • MPU_Config() : updated (based on the existing working code )

Also, there is no boatloader preloaded in the controller. 

 

 

But I am facing issue below issue added from Console output  : Failed to initialize RAMCode. Kindly suggest a solution 

SEGGER J-Link GDB Server V6.86f Command Line Version

JLinkARM.dll V6.86f (DLL compiled Oct 23 2020 18:00:13)

Command line: -port 2331 -s -device STM32F746NG -endian little -speed 4000 -if swd -vd
-----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:            off
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:                 STM32F746NG
Target interface:              SWD
Target interface speed:        4000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V9 compiled Dec 13 2019 11:14:50
Hardware: V9.30
S/N: 59302918
Feature(s): GDB
Checking target voltage...
Target voltage: 3.22 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 0x0803D114 (Data = 0xBF00E7FE)
Read 2 bytes @ address 0x0803D114 (Data = 0xE7FE)
Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x0803D114 (Data = 0xBF00E7FE)
Received monitor command: WriteDP 0x2 0xF0
O.K.
Received monitor command: ReadAP 0x2
O.K.:0xE00FD003
Reading 32 bytes @ address 0xE00FDFD0
Reading 64 bytes @ address 0x2004FFC0
Read 4 bytes @ address 0x2004FFEC (Data = 0x21000000)
Read 4 bytes @ address 0x08042354 (Data = 0x0000BF00)
Read 2 bytes @ address 0x08042354 (Data = 0xBF00)
Read 4 bytes @ address 0x080425B8 (Data = 0xFC16F7FF)
Reading 64 bytes @ address 0x20050000
WARNING: Failed to read memory @ address 0x20050000
WARNING: Failed to read memory @ address 0x20050004
...
Reading 64 bytes @ address 0x20050000
WARNING: Failed to read memory @ address 0x20050000
WARNING: Failed to read memory @ address 0x20050004
Received monitor command: reset
Resetting target
Downloading 456 bytes @ address 0x08000000 - Verified OK
Downloading 16128 bytes @ address 0x080001D0 - Verified OK
...
...
Downloading 16224 bytes @ address 0x900276A0 - Verified OK
Downloading 9240 bytes @ address 0x9002B600 - Verified OK
ERROR: Timeout while restoring target, core does not stop. (PC = 0x20010E16, XPSR = 0xA1000000, SP = 0x20011E10)!
Failed to initialize RAMCodeTimeout while restoring target, core does not stop. (PC = 0x20010112, XPSR = 0x41000000, SP = 0x20011DF8)!Failed to initialize RAMCode
Writing register (PC = 0x 8042848)
Read 4 bytes @ address 0x08042848 (Data = 0xD034F8DF)
Read 2 bytes @ address 0x08042848 (Data = 0xF8DF)
Read 2 bytes @ address 0x0804284A (Data = 0xD034)
Starting target CPU...
GDB closed TCP/IP connection (Socket 1012)
Debugger requested to halt target...
...Target halted (PC = 0x20010DDE)
GDB closed TCP/IP connection (Socket 1008)

 

1 Answer

0 votes
by
Hello,

according to the provided error logs, it seems to me that you have some problems with the external flash loader.

Please try first to locate all Embedded Wizard resources into the internal Flash instead of the QSPI flash. You can achieve that by setting EXTERNAL_FLASH to 0 within the makefile. If you are using other toolchains you have to disable following macros within the project options:

EW_BITMAP_PIXEL_SECTION_NAME
EW_FONT_PIXEL_SECTION_NAME
EW_USE_EXTERNAL_FLASH

Then rebuild the project - there should be no content in address range above 0x90000000.

Does it work?

Best regards,

Manfred.
by

Hi Manfred,

I tried the above steps in the project options

                                    <listOptionValue builtIn="false" value="EW_USE_EXTERNAL_FLASH=0"/>
                                    <listOptionValue builtIn="false" value="EW_BITMAP_PIXEL_SECTION_NAME=0"/>
                                    <listOptionValue builtIn="false" value="EW_FONT_PIXEL_SECTION_NAME=0"/>

Now , there is no content in the address range 0x90000000. 

However the issue still exisits . Console output is below

Code execution moves to void HardFault_Handler(void) function 

 

 

 

SEGGER J-Link GDB Server V6.86f Command Line Version

JLinkARM.dll V6.86f (DLL compiled Oct 23 2020 18:00:13)

Command line: -port 2331 -s -device STM32F746ZE -endian little -speed 4000 -if swd -vd
-----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:            off
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:                 STM32F746ZE
Target interface:              SWD
Target interface speed:        4000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V9 compiled Dec 13 2019 11:14:50
Hardware: V9.30
S/N: 59302918
Feature(s): GDB
Checking target voltage...
Target voltage: 3.26 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 0x08040110 (Data = 0xFFFFFFFF)
Read 2 bytes @ address 0x08040110 (Data = 0xFFFF)
Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x08040110 (Data = 0xFFFFFFFF)
Read 4 bytes @ address 0x0803C500 (Data = 0xF85DB003)
Reading 64 bytes @ address 0x2004FF00
Read 4 bytes @ address 0x0803BE5E (Data = 0xB15B7823)
Reading 8 bytes @ address 0x2004FF17
...
Reading 8 bytes @ address 0x2004FF2F
Received monitor command: WriteDP 0x2 0xF0
O.K.
Received monitor command: ReadAP 0x2
O.K.:0xE00FD003
Reading 32 bytes @ address 0xE00FDFD0
Received monitor command: reset
Resetting target
Reading 8 bytes @ address 0x2004FF17
...
Reading 8 bytes @ address 0x2004FF2F
Downloading 456 bytes @ address 0x08000000 - Verified OK
Downloading 16128 bytes @ address 0x080001D0 - Verified OK
...
Downloading 16224 bytes @ address 0x0807A430 - Verified OK
Downloading 9248 bytes @ address 0x0807E390 - Verified OK
Downloading 8 bytes @ address 0x080807B0ERROR: Failed to erase sectors 5 @ address 0x08040000 ((erase error))
Failed to erase sectors.

 - Verified OK
Downloading 4 bytes @ address 0x080807B8 - Verified OK
Downloading 4 bytes @ address 0x080807BC - Verified OK
Downloading 168 bytes @ address 0x080807C0 - Verified OK
Writing register (PC = 0x 8041d78)
Read 4 bytes @ address 0x08041D78 (Data = 0xFFFFFFFF)
Read 2 bytes @ address 0x08041D78 (Data = 0xFFFF)
Read 2 bytes @ address 0x08041D7A (Data = 0xFFFF)
Reading 64 bytes @ address 0x08040E00
Read 2 bytes @ address 0x08040E50 (Data = 0xFFFF)
Read 4 bytes @ address 0xE000ED14 (Data = 0x00040200)
Downloading 4 bytes @ address 0xE000ED14 - Verified OK
Reading all registers
Read 4 bytes @ address 0x08041D78 (Data = 0xFFFFFFFF)
Read 2 bytes @ address 0x08041D78 (Data = 0xFFFF)
Read 2 bytes @ address 0x08041D7A (Data = 0xFFFF)
Read 4 bytes @ address 0xE000EDFC (Data = 0x01000000)
Downloading 4 bytes @ address 0xE000EDFC - Verified OK
Reading all registers
Read 4 bytes @ address 0x08041D78 (Data = 0xFFFFFFFF)
Read 2 bytes @ address 0x08041D78 (Data = 0xFFFF)
Read 2 bytes @ address 0x08041D7A (Data = 0xFFFF)
Read 2 bytes @ address 0x0803B20C (Data = 0xB530)
Setting breakpoint @ address 0x0803B20C, Size = 2, BPHandle = 0x0001
Starting target CPU...
...Target halted (Vector catch, PC = 0x0803D118)
Reading all registers
Removing breakpoint @ address 0x0803B20C, Size = 2
Read 4 bytes @ address 0x0803D118 (Data = 0x4802B508)
Read 4 bytes @ address 0x2004FFEC (Data = 0x01000000)
Reading 64 bytes @ address 0x2004FFC0
Read 4 bytes @ address 0x08041D78 (Data = 0xFFFFFFFF)

 

by
Hello,

to be honest, for me it is not clear what the problem is....

Is the download of the application possible and successful? There are still errors reported from the J-Link. This should be solved first.

Are you able to run a simple C application, e.g. a main() with a few printf()? Does this work?

If downloading of the Embedded Wizard GUI application is working - do you have any outputs in the console window (via serial interface)?

Best regards,

Manfred.
by
Hello,

please try to rename EW_BITMAP_PIXEL_SECTION_NAME and EW_FONT_PIXEL_SECTION_NAME instead of assigning 0 (e. g. _EW_BITMAP_PIXEL_SECTION_NAME and _EW_FONT_PIXEL_SECTION_NAME)

Regards,
Martin

Embedded Wizard Website | Privacy Policy | Imprint

...