2024-05-28 12:50 PM
I am new to ST digital products and am working on getting the STM8L Discovery running for coding and debugging before a new serious project begins. My question is how to identify and connect the needed resources for this MPU, etc. Like, how to talk to the Discovery board, compile code, debug it, program and reprogram it. I have the Discovery board and legacy USB cable to-from Windows PC. I have lots of PDF data files and ST Cube MX, Cosmic CXSTM8 Special Edition, ST Visual Develop, ST Visual Programmer. How do all of these tools work together for editing source, compile, program and debug, reprogram? Feedback is earnestly requested!
2024-05-31 04:52 AM
You need to have some background with C programming, compilers and linkers. Read "UM1014 - Getting started with STM8L-DISCOVERY" and the reference documents. The Discovery board is connected to your PC by USB. But first install the software.
2024-06-01 02:50 PM
Thank you for the reply. But which "software do I install?"
I have done embedded MPU projects with K&R C and PIC but no ST. My first main help for STM8L152 is what software do I use to talk back and forth from Windows 10 PC and Discovery board? I am stumped so far.
2024-06-02 02:45 AM
Read the documents. For example UM1014 - Getting started with STM8L-DISCOVERY page 2.
1.2.1 Software environment
1.2.2 Connect the STM8L-DISCOVERY to the host PC
2024-06-03 12:37 AM
Install ST Visual Develop. It is IDE where you will write your source code and debug. Then install Cosmic compiler (or another one, like SDCC). With cosmic you will need to get (free) liecence (takes up to one day). You should also install ST Visual Programmer (to be able change "option bytes" etc.). And thats all what is needed for basic "bare metal" programming / debugging. If you want, you can download and include also STM8L standard peripheral library. STM8CubeMX is intended only for "planning", it is not able to generate any source code or project (like STM32CubeMX).
Some time you probably spent to study compiler (how to manage interrupts etc) and some time also takes Standard Peripheral Library implementation (which file to copy, which file to include, what to define etc.).
2024-06-13 08:23 AM
Thanks, this helps. What I am missing is how to tell that my USB connection to DISCOVERY board is working? I got a mini USB cable that does power AND data.
I have Cosmic, STVD, STVP and STM8CubeMX so I think I have all of the software resources needed. Some documents say that this environment will support assembler coding--I'm studying that. Is there a separate assembler/linker?
All in all, ST has a very comprehensive tool set. The Cosmic compiler looks like year-to-year need for repeating free licenses. I don't see a paid path after that for later on.
For now, I am trying to use the sample code for the DISCOVERY board as the starting point for my first phase. So I need to figure out how STVD works. Firstly, the two attached error reports are puzzling and how to fix?
2024-06-13 09:10 AM
Check if your Stlink (programmer) works.
a) After USB connection, it shoud look like "flash drive"
b) Start STVP, select tool (Stlink) and chip and try to read MCU memory.
In case of succes, you are sure that your PC can comunicate with programmer (Stlink) and programmer can communicate with target MCU (STM8L).
Then:
1. run command line as administrator and
2. execute command Regsvr32 /u "C:\Program Files (x86)\Common Files\Microsoft Shared\DAO\DAO350.DLL" (including quotation marks)
3. execute command Regsvr32 "C:\Program Files (x86)\Common Files\Microsoft Shared\DAO\DAO350.DLL" (including quotation marks)
2024-10-04 08:57 AM
I've been trying, with little success, to get the STM8L-DISCOVERY board to open up for development of its own source code collection in STW8009.zip. Using Windows 10, I used the STSW-LINK009 stlink-winusb-install.bat files from the ST website but it did not do anything. Then I executed dpinst_amd64.exe which displayed and looked OK. But no driver was found in Device Manager and running DPVD and Debug yielded message of no configuration data. One time I got the batch file to work to show an instantiation of the USB driver installation in Device Manager—one time, even after Win10 restarts.
I then tried to use the ST-LINK/V2 and STLINK-V3SET modules to access and program the DISCOVERY board. I realized finally that the DISCOVERY board is supposed to have its own STLINK built-in. I set up STVD and STVP as best I could to access and just view the board's existing memory and registers, et al. I failed at this.
Can someone please point my weary fingers and eyes to the right solution, or a set of suggestions about how I might proceed?