Skip to main content
Visitor II
January 13, 2021
Solved

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

  • January 13, 2021
  • 3 replies
  • 2450 views

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.

    This topic has been closed for replies.
    Best answer by Ted Jackson

    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

    3 replies

    Technical Moderator
    January 15, 2021

    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

    Visitor II
    January 15, 2021

    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?

    Technical Moderator
    January 18, 2021

    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

    Technical Moderator
    January 18, 2021

    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

    Visitor II
    January 25, 2021

    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.