cancel
Showing results for 
Search instead for 
Did you mean: 

Hi. Can anyone tell me how to get started building the ST25R3911-DISCO example source? A Keil toolchain? Well that's helpful. Eclipse is preferred IDE? Thx

Ted Jackson
Senior

I've been working successfully with the STM8 MCUs, using ST-LINK, building, debugging. But I so far can't figure out how to get started building for the STM32L4x6, which hosts the ST25R3911-DISCO board.  Can't even pin down an IDE yet.

1 ACCEPTED SOLUTION

Accepted Solutions

Can you verify this please:

10-pin SWD on DISCO   20-pin on ST-LINK/V2

VTref 1 ---------- 1 VCC

SWDIO/TMS 2 ---------- 7 SWDIO/TMS

GND 3 ---------- 4-20 GND

SWCLK/TCK 4 ---------- 9 SWDCLK/TCLK

GND 5 ---------- 4-20 GND

SWO/TDO 6 ---------- 13 SWO/TDO

---/NC/key 7

TDI 8 ---------- 5 NC/TDI

NC 9 ---------- 4-20 GND

nRESET 10 -------- 15 RESET

View solution in original post

17 REPLIES 17
Ulysses HERNIOSUS
ST Employee

Hi Ted,

the disco source is built using Keil only. You will find a uvision project. Connector P201 is a JTAG/SWD interface to assist in software development. It can be connected to an external ST-LINK/V2 device using a 9-pin Cortex®-M adapter.

Best Regards, Ulysses

I found DISCO-STM32L4x6.uvprojx in the ST25R3911B_DISCO_FW_v1_2_8 tree. Doesn't look like MS Visual Studio will import it. So, I'm installing the uvision/Keil IDE. uVision 5.33 compiles, then aborts a build with "The code size of this image (74096 bytes) exceeds the maximum allowed for this version of the linker." I'm using the Lite version.

But I brought the FW into STM32CubeIDE, built without errors. Trying to run it, it reported "No ST-LINK detected! Please connect ST-LINK and restart the debug session.". I'll get to work on the ST-LINK/V2 connection. So can I build it with CubeIDE evidently? Does CubeIDE incorporate the Keil toolchain?

Ulysses HERNIOSUS
ST Employee

Hi Ted,

all underlying libraries etc are built to work with various compilers (at least IAR, ARMCC and GCC). So porting to a different tool chain rarely needs more than creating a new Project file which includes the required files.

Best Regards, Ulysses

Hi Ted,

have you connected the external ST-LINK/V2 to the ST25R3911B-DISCO P201 connector? Is the external STLINK/V2 properly recognized by your PC (you can use STM32 ST-LINK utility or STM32CubeProgrammer to check that the STLINK/V2 is properly recognized by your PC). Make sure to have Pin2=SWDIO, Pin4=SWCLK, Pin6=SWO, Pin10=RESET, Pin1=Vcc, Pin3/5/9=GND, Pin7 is not used and might need to be removed with some 9-pins adaptors.

Regarding your question "Does CubeIDE incorporate the Keil toolchain?", STM32CubeIDE is an Eclipse based IDE; it uses the GCC toolchain and the GDB debugger but not the Keil toolchain.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks. Am building my own JTAG/SWD passthrough, though Adafruit has a nice cheap one.

Hi Ted,

as far as I know, STM32CubeIDE 1.5.0 supports only ST-Link or J-Link debug probe.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Ons KOOLI
Senior III

Hi Ted,

Well, I checked out the FW and found that it is made with MDK-ARM, as you previously mentioned.

There is no official guide allowing migration from Keil to CubeIDE.

However, you should be able to use the methods used for migrating Keil projects to TrueSTUDIO and probably manage to get it to work with STM32CubeIDE since they are pretty similar.

I haven't tried it myself and I'm not sure if it's possible, but if you want to try then here is the manual for how to do it in TrueSTUDIO.

Best Regards,

Ons.

So, it's just a consecutive pin-for-pin pass-through of pins 1-10 of the JTAG 10-pin to pins 1-10 of the SWD 20-pin then and nothing more? Thx Pin 8 too, I assume?

Hi Ted,

I don't think it is a direct pass-through - looking at the overview at Keil coresight connectors. We are using 9-pin Cortex®-M adapters which you can find from Segger or various distributors when we need to debug. Download would also be possible through USB DFU (from ST25R3911B-DISCO GUI or STM32CubeProgrammer).

Regards, Ulysses