2021-01-13 01:01 PM
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.
Solved! Go to Solution.
2021-01-28 06:10 PM
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
2021-01-14 11:56 PM
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
2021-01-15 01:06 PM
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?
2021-01-17 11:12 PM
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
2021-01-18 06:16 AM
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
2021-01-23 09:06 AM
Thanks. Am building my own JTAG/SWD passthrough, though Adafruit has a nice cheap one.
2021-01-25 01:36 AM
Hi Ted,
as far as I know, STM32CubeIDE 1.5.0 supports only ST-Link or J-Link debug probe.
Rgds
BT
2021-01-25 06:50 AM
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.
2021-01-27 12:15 PM
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?
2021-01-27 10:55 PM
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