CLOSED, FOCUS GOES TO HAL BASED CORES - Improving F4 core (libmaple based)

Limited support for STM32F4 Discovery, Nucleo and custom F4 boards
victor_pv
Posts: 1599
Joined: Mon Apr 27, 2015 12:12 pm

Re: Improving F4 core (libmaple based)

Post by victor_pv » Mon Apr 24, 2017 7:51 pm

michael_l wrote:Please take into use stevestrong's enhanced USB serial code for F4 which he made for F1 originally. Actually I'm not sure if it already is included in current F4 repo. There's huge difference in terms of speed.
The USB code in my version should all be from Steve's repo, I only made some changes to it manually to make it compatible with the rest of that core (i.e function calls to the core, registers and irq lines names)

User avatar
Pito
Posts: 1497
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Improving F4 core (libmaple based)

Post by Pito » Tue Apr 25, 2017 9:15 am

I've tried with stevestrong's Generic F407 variant. Both Serial and SerialUSB work.
There is the -archive flag issue with combiner recipe on Sloeber, however.
Pukao Hats Cleaning Services Ltd.

User avatar
Pito
Posts: 1497
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Improving F4 core (libmaple based)

Post by Pito » Tue Apr 25, 2017 10:37 am

While messing with Serial in victor's core:
1. while building I get warning: undefined reference to `Serial'
2. while debugging it crashes at addr 8002968 (or 2962)
3. it seems to me the ring_buffer or buf structures are not set properly, or something like that.
Serial 407 VP issue.JPG
Serial 407 VP issue.JPG (177.18 KiB) Viewed 209 times
Last edited by Pito on Tue Apr 25, 2017 4:38 pm, edited 2 times in total.
Pukao Hats Cleaning Services Ltd.

victor_pv
Posts: 1599
Joined: Mon Apr 27, 2015 12:12 pm

Re: Improving F4 core (libmaple based)

Post by victor_pv » Tue Apr 25, 2017 1:43 pm

Pito wrote:While messing with Serial in victor's core:
1. while building I get warning: undefined reference to `Serial'
2. while debugging it crashes at addr 8002968 (or 2962)
3. it seems to me the ringbuffer or buf is not set properly, or something like that.
Serial 407 VP issue.JPG
I have been trying to install the eclipse j-link plugin for the last 3 or 4 hours. As much as I like using eclipse, I am hating updating it (or rather trying to)...

ag123
Posts: 711
Joined: Thu Jul 21, 2016 4:24 pm

Re: Improving F4 core (libmaple based)

Post by ag123 » Tue Apr 25, 2017 2:43 pm

try the st-link dongle if you happen to have that handy, st-link needs to work through openocd though
for openocd i used the binaries from gnu-arm-eclipse
http://gnuarmeclipse.github.io/openocd/install/
note that i'm using linux though
i think it is possible to connect via the j-link dongle via openocd as well

User avatar
Pito
Posts: 1497
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Improving F4 core (libmaple based)

Post by Pito » Tue Apr 25, 2017 3:14 pm

I have been trying to install the eclipse j-link plugin for the last 3 or 4 hours.
Do you follow my guide?
0. Prerequisites: Jlink debugger (any black or gray box :) ) and Segger's Jlink sw pack installed and working with your hw fine (!)
https://www.segger.com/downloads/jlink
J-Flash works identically as the ST-Link utility, so you may verify..

This is the front view at the Jlink box.
Jlink header.JPG
Jlink header.JPG (22.89 KiB) Viewed 97 times

Except the SWDIO and SWDCLK and GND you must connect VCC(1) to 3.3V (it does not power the chip but detects the chip's voltage only)!
Your board must be powered.
I connected the RESET(15) too..

1. Install the latest nightly build of Sloeber IDE from:
https://oss.sonatype.org/content/reposi ... -SNAPSHOT/

2. Update Sloeber and install Segger's Jlink plugin, GNU GDB and Packs support plugin (and others..) via "Install new software" into the Sloeber from:
http://eclipse.baeyens.it/update/V4/nightly

3. Install Packs Manger for STM32F103 (or others when needed):
http://gnuarmeclipse.github.io/plugins/packs-manager/
EDIT: I have to install the Packs manager from http://gnuarmeclipse.sourceforge.net/updates-test in order to get STM32F407 added
EDIT: While installing latest MCU packages install the latest (ie 2.11.0 for F407).

4. Configure the project and debug environment (select STM32F103 in Setting>Devices):
http://gnuarmeclipse.github.io/debug/jlink/
Note: the guide tells you you have to start JLinkGDBServerCL.exe, here it works with JLinkGDBServer.exe

5. Here I have to start the jlink gdb server manually as External tool first (add the "Jlink GDB Server" into "External tools configuration"). When the Jlink GDB Server apps starts, just click ok. Only after that I click on my debug_project under the Bug Icon.. (what is the trick to get it running according to the books??).
The "Start Jlink GDB server locally" is disabled here (Debug configuration).

6. When the package for stm32f103 is installed in Sloeber you may mess with peripherals as the package includes the F103 .SVD file with registers' and peripheral's defs for you:
http://gnuarmeclipse.github.io/debug/pe ... registers/
Last edited by Pito on Tue Apr 25, 2017 3:40 pm, edited 1 time in total.
Pukao Hats Cleaning Services Ltd.

victor_pv
Posts: 1599
Joined: Mon Apr 27, 2015 12:12 pm

Re: Improving F4 core (libmaple based)

Post by victor_pv » Tue Apr 25, 2017 3:39 pm

Pito wrote:
I have been trying to install the eclipse j-link plugin for the last 3 or 4 hours.
Do you follow my guide?
..
1. Install the latest nightly build of Sloeber IDE from:
https://oss.sonatype.org/content/reposi ... -SNAPSHOT/

2. Update Sloeber and install Segger's Jlink plugin, GNU GDB and Packs support plugin (and others..) via "Install new software" into the Sloeber from:
http://eclipse.baeyens.it/update/V4/nightly

3. Install Packs Manger for STM32F103 (or others when needed):
http://gnuarmeclipse.github.io/plugins/packs-manager/
EDIT: I have to install the Packs manager from http://gnuarmeclipse.sourceforge.net/updates-test in order to get STM32F407 added
EDIT: While installing latest MCU packages install the latest (ie 2.11.0 for F407).

4. Configure the project and debug environment (select STM32F103 in Setting>Devices):
http://gnuarmeclipse.github.io/debug/jlink/
Note: the guide tells you you have to start JLinkGDBServerCL.exe, here it works with JLinkGDBServer.exe

5. Here I have to start the jlink gdb server manually as External tool first (add the "Jlink GDB Server" into "External tools configuration"). When the Jlink GDB Server apps starts, just click ok. Only after that I click on my debug_project under the Bug Icon.. (what is the trick to get it running according to the books??).
The "Start Jlink GDB server locally" is disabled here (Debug configuration).

6. When the package for stm32f103 is installed in Sloeber you may mess with peripherals as the package includes the F103 .SVD file with registers' and peripheral's defs for you:
http://gnuarmeclipse.github.io/debug/pe ... registers/
I do, but step 2 always fails, can't install the j-link files because of a failed dependency.
I don't know how many combinations I have tried, installing stable, updating, then trying to install jlink, installing stable, then try to install j-link. installing a nightly build, then trying to install j-link. Updating then trying to install j-link...
I just downloaded another nightly build yesterday night and about to wipe sloeber and the workspace and start over again...

User avatar
Pito
Posts: 1497
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Improving F4 core (libmaple based)

Post by Pito » Tue Apr 25, 2017 3:45 pm

Yea, I had installed the Sloeber stable too, but after a few days of messing with it I downloaded the NIGHTLY and the gnu JLink/gdb/packs installed ok. You may try to install gnu arm stuff from the updates-test (see the link above), I needed that for reinstalling gnu arm Pack Manager in order to be able to add F407 to already installed F103.
And yes it took me a week to master the stuff, but now it works as advertised (except the starting the Jlink Server has to be done manually here via External Tools.).
Last edited by Pito on Tue Apr 25, 2017 3:53 pm, edited 1 time in total.
Pukao Hats Cleaning Services Ltd.

ag123
Posts: 711
Joined: Thu Jul 21, 2016 4:24 pm

Re: Improving F4 core (libmaple based)

Post by ag123 » Tue Apr 25, 2017 3:53 pm

i messed up my eclipse with sloeber, in the end i decided to simply stay with gnu arm eclipse (not arduino native though) :lol:

victor_pv
Posts: 1599
Joined: Mon Apr 27, 2015 12:12 pm

Re: Improving F4 core (libmaple based)

Post by victor_pv » Tue Apr 25, 2017 4:09 pm

Deleted sloeber, deleted the workspace, installed the nightly build from yesterday, and was able to install J-Link, finally...
Now let's see if I can complete the rest of the steps without messing it up again, unlikely :lol:

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest