help me stm32f103rc

jagger075
Posts: 5
Joined: Sat Dec 21, 2019 10:42 pm

help me stm32f103rc

Post by jagger075 »

ciao a tutti sono appena arrivato e gia vi pongo un grave problema

ho un problema con una scheda skr mini v1.1 che dovrebbe corrispondere ad una stm32f103rc se non sbaglio
se sbaglio corregetemi
bene ho usato questa shceda per autocostruire una stampante 3d

come os ho installato ubuntumate 18.4
ed ho il problema che quando collego l usb non vedo niente nella lista delle periferiche non la vede nemmeno
ho seguito o meglio cercato di seguire la guida del sito github ma senza successo nell installazione del driver di questa scheda
quacuno ha un metodo semplice per farlo
oppure me lo puo spiegare piu elementare possibile per cortesia
ho la stampante ferma vi chiedo un aiuto grazie
non riesco a capire con quale arduino lavorare come installare e aprire il maple un po tutto
potreste seguirmi con una installazione dall inizio?
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: help me stm32f103rc

Post by mrburnette »

From the old forum, Linux:

https://web.archive.org/web/20190316153 ... m.php?f=22

From https://github.com/rogerclarkmelbourne/ ... stallation
Linux
  • Copy the Arduino_STM32 folder to the hardware folder in your Arduino sketches folder. If the hardware folder does not exist, please create one.
  • Run the udev rules installation script in tools/linux/install.sh.
Note. If you are uploading via USB to Serial or STLink etc, you may need to set the relevant permissions for your specific upload device in order to be able to use it from within the Arduino IDE. You may also need to change the udev rules for the device in question.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: help me stm32f103rc

Post by ag123 »

please write in english or at least state your language in english. i assume you are writing in italian?
https://translate.google.com/translate? ... 135%23p135
stm32f103 mcus normally do not have its own usb bootloader
(mcus in the m4 family normally have built-in usb (DFU) boot loader, firmware uploader, so if you want to use a built-in usb flasher, u'd at least need to get an m4 e.g. stm32f4xx mcu)

so you would need to start with either getting a usb-uart dongle to program your sketch or a boot loader
https://medium.com/@paramaggarwal/progr ... 3cec0dbc86

or get an st-link v2
https://github.com/stm32duino/wiki/wiki/Upload-methods

if you are unfamiliar with these, and just getting started with stm32
get a nucleo or discovery board from ST, they are original boards from ST real stm32 mcu and well made, often with extra peripherals leds etc
and they have a st-link v2 built on board with the particular boards

there are many supported boards
https://github.com/stm32duino/Arduino_Core_STM32
jagger075
Posts: 5
Joined: Sat Dec 21, 2019 10:42 pm

Re: help me stm32f103rc

Post by jagger075 »

hello mrburnette then I would like to make some clarifications
the guide that the site suggested to me is the one you indicated, that is this one here: https://github.com/rogerclarkmelbourne/ ... stallation
I would like to specify that the guide regarding the installation on windows 10 was successful immediately instead this on linux gives me many problems because I am inexperienced with arduino
first problem: what i have is that where it tells me "
Copy the Arduino_STM32 folder to My Documents / Arduino / hardware (Note: if the hardware folder doesn't exist you will need to create it). "I have an Arduino folder inside Documents but actually inside the home I have a snap folder and inside there is an arduino-mhall119 folder is this the problem? that is, that I have the wrong place to paste the Arduino_STM32 folder?
second problem: between the guide that I was following this here that I found the prerequisites there is a passage that I have not done that is this: https://web.archive.org/web/20190316155 ... duino.com/ index.php? title = Installation
"Prerequisites
If your STM32 board does not have a bootloader yet and you want to be able to program it over USB, you'll have to upload the STM32duino bootloader to flash memory. See Burning the bootloader. "
could this be another problem why i don't see the skr mini v1.1 card in the list of lsusb?
ie should I load the bootloader into the flash memory of the card?
since this card has a mini sd reader where inside there is a mini sd where inside through plattformio I loaded the firmware of the marlin 2.0 printer?
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: help me stm32f103rc

Post by ag123 »

take a look at my reply here too
viewtopic.php?f=59&t=35&p=150#p150
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: help me stm32f103rc

Post by mrburnette »

jagger075 wrote: Sun Dec 22, 2019 11:11 am ...
first problem: what i have is that where it tells me "
Copy the Arduino_STM32 folder to My Documents / Arduino / hardware (Note: if the hardware folder doesn't exist you will need to create it). "I have an Arduino folder inside Documents but actually inside the home I have a snap folder and inside there is an arduino-mhall119 folder is this the problem? that is, that I have the wrong place to paste the Arduino_STM32 folder?

second problem: between the guide that I was following this here that I found the prerequisites there is a passage that I have not done that is this: https://web.archive.org/web/20190316155 ... duino.com/ index.php? title = Installation
"Prerequisites
If your STM32 board does not have a bootloader yet and you want to be able to program it over USB, you'll have to upload the STM32duino bootloader to flash memory. See Burning the bootloader. "
could this be another problem why i don't see the skr mini v1.1 card in the list of lsusb?
ie should I load the bootloader into the flash memory of the card?
since this card has a mini sd reader where inside there is a mini sd where inside through plattformio I loaded the firmware of the marlin 2.0 printer?
Being unfamiliar with the ArduinoIDE is a disadvantage. You must (really should) follow this installation guide:
https://www.arduino.cc/en/Guide/Linux
Remember to perform the install script. Test your install by compiling a test script.

On my Debian system, thus creates a directory named 'Arduino' in $HOME. It also creates '.arduino' directory where the IDE code lives. It is possible to muck with these defaults, but I suggest a standard locations.

So, using the default, $HOME/Arduino/hardware is where you will unzip Roger's core.
If the IDE was open, close it.
Open the IDE and Roger's board selections will appear.

USB enumeration (for Maple clone boards) requires proper hardware on the USB d+/d- lines (correct pull-up resistors.) The bootloader must enumerate ...
A complete description is here:
https://jeelabs.org/article/1612a/
Lots of places for things to go wrong. Under Linux, setting correct permissions is imperative.
User avatar
Just4Fun
Posts: 28
Joined: Thu Dec 19, 2019 10:45 am
Answers: 1

Re: help me stm32f103rc

Post by Just4Fun »

jagger075 wrote: Sun Dec 22, 2019 11:11 am ie should I load the bootloader into the flash memory of the card?
since this card has a mini sd reader where inside there is a mini sd where inside through plattformio I loaded the firmware of the marlin 2.0 printer?
Hi,
your board is a 3D printer board and very probably (= for sure...) it does not have the needed bootloader intended to work with Arduino IDE + the "Roger core" or the official "ST core".
The bootloader must reside in the flash memory of the STM32, not in the SD card of your board!

Looking at your board schematic it seems that it has the right pullup value on D+ (1k5).

So, if you want to use (program) your 3d printer board with Arduino IDE first step is write the (right) bootloader inside the flash memory of you STM32 MCU...
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: help me stm32f103rc

Post by ag123 »

this is quite interesting, so it seemed libmaple is on 3d printers board in the wild (there is a Maple com port in the instruction manual !) :)
https://github.com/bigtreetech/BIGTREET ... ctions.pdf
https://github.com/bigtreetech/BIGTREET ... -MINI-V1.1
here are the things you can try

get a st-link v2 dongle
https://www.adafruit.com/product/2548
https://www.st.com/en/development-tools/st-link-v2.html

there are some pins that read ISCP (check the schematics and board layout diagrams, photos in the instruction manual as well)
pin 1 3v3
pin 2 gnd
pin 3 swclk
pin 4 sdwio

connect them appropriately, and relevant software and steps are similar to these
https://github.com/stm32duino/wiki/wiki/Upload-methods
https://github.com/rogerclarkmelbourne/ ... from-Linux
the vendor seemed to have provided prebuilt firmware in their github repository - in the drive test directories
https://github.com/bigtreetech/BIGTREET ... r/firmware

my suggestions is to approach and ask your vendor, you can even log an issue on their github.
how to flash their firmware? can the firmware directly be taken from the github repository and flashed using an st-link?
or does it need Roger's boot loader?

if you are impatient to wait for the vendor, you can try things like
1) using st-link, try to do a backup / dump of the firmware from the existing rom.
2) flash the vendor's firmware using st-link (0x800,0000) and see if it works

if you try Roger's stm32duino-bootloader at (0x8000000), PC13 that is led on blue pill is apparently routed to the headers for LCD,
so if you want to see blinks you would need to connect a led from that pin to ground preferably with a resistor. on blue pill it is a sinking pin i.e. the led is connect from vdd to pc13 on an actual blue pill.

due to this setup, my guess is that the firmware is compiled to be installed at 0x8000000. so chances are that simply installing the firmware via st-link would get it working. but nevertheless like suggested, get support from the vendor directly, on their github etc. as after all they sold you the product ! :)

if the pre-built firmware works, you could then try compiling that Marlin 2.0 firmware with Roger's (Libmaple) core. in the same way select st-link as the upload method in Arduino IDE

and it seemed these are the boards
https://www.aliexpress.com/wholesale?ca ... t=skr+mini
jagger075
Posts: 5
Joined: Sat Dec 21, 2019 10:42 pm

Re: help me stm32f103rc

Post by jagger075 »

mrburnette I followed the installation of the ide you recommended step by step
Being unfamiliar with the ArduinoIDE is a disadvantage. You must (really should) follow this installation guide:
https://www.arduino.cc/en/Guide/Linux
Remember to perform the install script. Test your install by compiling a test script.
but I always block at the same point, that is, when it comes to addressing and finding the port where the card is connected but the problem is always the same, there is no card connected

ag123
evidently you guessed the problem
maybe loading the marlin firmware on the sd card directly I was wrong
because the site in fact provides me with the firmware already with the firmware preconfigured with the drivers for the usb obviously
then I have two questions
1 what is the point of all that procedure recommended by them for installation in linux if you just have to load their pre-configured firmware?
2 only way to access the flash memory of the card is through external adapter connected on the lcd output of the card if I have not misunderstood?
3 if I did not misunderstand another solution would be to resume the marlin 2.0 firmware compile it by implementing the compilation with the changes made in the scripts that concern the usb with what is inside the roger core script?
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: help me stm32f103rc

Post by ag123 »

my guess is actually the board should already have firmware in it
https://github.com/bigtreetech/BIGTREET ... ctions.pdf
https://github.com/bigtreetech/BIGTREET ... -MINI-V1.1

if you look at the video apparently it has a jack for dc power
https://www.youtube.com/watch?v=QM8JC1-TgAQ&t=23s
and on the schematics
https://github.com/bigtreetech/BIGTREET ... 1.1sch.pdf
it isn't too clear how the power is supplied, hence you may need to try first by plugging in only usb and see if some of the power leds comes on or even connect the dc power jack to see if that powers the board

based on the instructions, connecting it in windows one would see a 'Maple Serial' com port.
in Linux, connect that board and run lsusb you should see a device that is basically com port
check if you see something like 1eaf:0004 in lsusb. if it shows up, that is the Libmaple serial port, normally it goes to /dev/ttyACM0 in Linux
you can use serial terminals like putty to connect to it

normally the sd card is not for for the firmware, i'm not too familar with 3d printer firmware, but accordingly some 3d printing firmware (Marlin?) lets you place a g-code file that you generate from your slicer on an SD card. and there should be some ways to select and print that file directly.
that makes for a 'hostless' kind of 3d printing as normally you would need to connect the controller card to a host program e.g. on your pc or things like octoprint https://octoprint.org/ running say running on a RPi board.

if the vendor provides firmware updates directly from the sd card, my guess is they would need to state so in their manuals with the steps as this would take a custom program (in stm32 firmware) to do just that. fyi this is not found in their manual, link above.

as the vendor provided a pin header for swd (st-link v2) they call it ISCP on their boards. this provided a hint on how to program their boards.
i.e. you need a st-link v2 dongle.

my guess is if the board is not pre-loaded with firmware, you can try to contact the vendor and tell them so. and you can ask your questions like how to program the board and so forth. but if you feel adventurous, you could try those steps mentioned prior e.g. getting the st-link v2 take the firmware in the vendor repository and try flashing etc (do a backup of existing firmware using st-link if possible). but like mentioned, get in touch with vendor 1st as this may impact warranty etc.

once you figured out how to flash that firmware, you could then try the next steps like compiling the marlin firmware from sources.
normally this is done when you are trying to change features in the marlin firmware, as since this is a 3d printer board, the vendor should have installed default firmware that could for instance do some generic prints.

but like mentioned, get in touch with vendor for more support, so that you can ask them questions etc.
Last edited by ag123 on Sun Dec 22, 2019 5:52 pm, edited 13 times in total.
Post Reply

Return to “STM32F1 based boards”