Closed KKuKK closed 3 years ago
Hi, I use STLink, since IMO it's the most convenient way to upload sketchs to the STM32/STM8 MCU's, you don't have to mess with boot pins nor bootloaders and you can find clones very cheap on aliexpress/ebay.
If you have an spare bluepill you may want to try to convert it into a stlink
On the datasheet says this:
3.3 Boot modes At startup, the boot pin and boot selector option bit are used to select one of the three boot options: • Boot from User Flash • Boot from System Memory • Boot from embedded SRAM The boot loader is located in System Memory. It is used to reprogram the Flash memory by using USART on pins PA14/PA15 or PA9/PA10.
Pins PA9 and PA10 are the default for the USART so it should work, if not give a try to the PA14 (TX) / PA15 (RX)
Hi Great to get answer so fast, thanks 😊 I bought a st-link, will take some time to arrive. Is the only way for an stm32f030c8t6 So far I understood. The funny thing,if I use Arduino ide with stm32f103xx I can flash the blink program Over pin a9,a10 but it is not running. I guess wrong Variant files, wrong pins, maybe Wrong starting address. I tried it with platformio but there is no board for the stm32f030xx I found a json file for the board folder, but none for the variant folder; So all messed up, cannot built the hex file. Right now i am stuck, I bought the smaller stm32 and thought it should be the same As the bluepill, that was a mistake. I am a beginner with stm, only used atmel Always bad to start with the most complicated chip 😂😂 Right now I have 3 stm32f030c8t6 and your github link is one of two links Found about It. So, how do you integrate these chip in platformio? Even if i get the st-link I cannot Flash the chip, because it is not offered as a board. Only hundred versions of Stm32f103. Thanks for your answer Greetings klaus Von meinem iPhone gesendet
Am 05.05.2021 um 21:03 schrieb .rpv @.***>:
Hi, I use STLink, since IMO it's the most convenient way to upload sketchs to the STM32/STM8 MCU's, you don't have to mess with boot pins nor bootloaders and you can find clones very cheap on aliexpress/ebay.
If you have an spare bluepill you may want to try to convert it into a stlink
On the datasheet says this:
3.3 Boot modes At startup, the boot pin and boot selector option bit are used to select one of the three boot options: • Boot from User Flash • Boot from System Memory • Boot from embedded SRAM The boot loader is located in System Memory. It is used to reprogram the Flash memory by using USART on pins PA14/PA15 or PA9/PA10.
Pins PA9 and PA10 are the default for the USART so it should work, if not give a try to the PA14 (TX) / PA15 (RX)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I have used platformio IDE a few times, but I haven't idea how to create variants for this IDE, the variant on this repo it's for arduino IDE but the new version of this core (ST Core v2.0, that was released a few days) already has support for most of the F030XX series, so if you're using using arduino IDE upgrade the core to the newer 2.0 version or you'll have to install this variant manually (instructions are on the readme/main of this repo). Maybe that's why you can't program correctly the MCU, the USART interface it's the same as the bluepill (F103), the F030C just has one boot pin).
Great you answer so fast, thanks a lot! I already installed the boards in the arduino Ide. I found two json links, stm32duino....and dan.drown.org....One link is all about stm32f103xxxx The other mostly stm32f030xxxx. In the dan.org is my chip included, but no option for Uploading with Pin a9,a10. There is only an option for stm32cubeprogrammer, which i don’t have. It is for the pins clk,dio on the top back of the chip i assume.
I am looking for the json link st core, maybe I have the wrong board packages. No, cannot find other json links, cannot find st core as a board. Do you have a different json link? Thanks for help Greetings klaus
Von meinem iPhone gesendet
Am 07.05.2021 um 01:39 schrieb .rpv @.***>:
I have used platformio IDE a few times, but I haven't idea how to create variants for this IDE, the variant on this repo it's for arduino IDE but the new version of this core (ST Core v2.0, that was released a few days) already has support for most of the F030XX series, so if you're using using arduino ID upgrade the core to the newer 2.0 version or you'll have to install this variant manually (instructions are on the readme/main of this repo). Maybe that's why you can't program correctly the MCU, the USART interface it's the same as the bluepill (F103), the F030C just has one boot pin).
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi again Here is what i have installed in the arduino ide under boards
Stm32fxx/gd32f1xx boards by stm32duino version 2021.3.18
And
Stm32 mcu based boards by stmicroelectronics version 2.0.0
In the second is my board with the only upload option as i mentioned above which don’t work for me with an usb2ttl chip. May be there are more boards to install Greetings klaus
Von meinem iPhone gesendet
Am 07.05.2021 um 08:09 schrieb Klaus Kreutzer @.***>:
Great you answer so fast, thanks a lot! I already installed the boards in the arduino Ide. I found two json links, stm32duino....and dan.drown.org....One link is all about stm32f103xxxx The other mostly stm32f030xxxx. In the dan.org is my chip included, but no option for Uploading with Pin a9,a10. There is only an option for stm32cubeprogrammer, which i don’t have. It is for the pins clk,dio on the top back of the chip i assume.
I am looking for the json link st core, maybe I have the wrong board packages. No, cannot find other json links, cannot find st core as a board. Do you have a different json link? Thanks for help Greetings klaus
Von meinem iPhone gesendet
Am 07.05.2021 um 01:39 schrieb .rpv @.***>:
I have used platformio IDE a few times, but I haven't idea how to create variants for this IDE, the variant on this repo it's for arduino IDE but the new version of this core (ST Core v2.0, that was released a few days) already has support for most of the F030XX series, so if you're using using arduino ID upgrade the core to the newer 2.0 version or you'll have to install this variant manually (instructions are on the readme/main of this repo). Maybe that's why you can't program correctly the MCU, the USART interface it's the same as the bluepill (F103), the F030C just has one boot pin).
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi, sorry for the delay, I was using my F030C8 and can't use for this test until I finish a project.
So I didn't tried before to upload using the usart but I just tried and it works fine, here's how I did it:
*This may be required to have it installed, it's a free (of charge) software that you can download on the ST site.
I tested this with the blink sketch and was working.
Hi 🙋 No problem 😉 , don’t expect answers at all. It’s a kindness of you. That’s what I tried several times. Upload method stm32cubeprogrammer->serial But I get the message „“programmer not found“ That’s why I thought I need these programmer and it will not work with a simple Usb2ttl converter. Which software of your st-link do I need? The funny thing is, if I select the wrong chip, The bluepill, which have the uploadoption Serial, than it is flashing. So it was quite clear That it must work in principal. Thanks a lot for you help. Always sad to buy new stuff and getting nothing to run. So I assume I only need these software for the cubprogrammer even when I use the usb2ttl converter. Greetings klaus
Von meinem iPhone gesendet
Am 09.05.2021 um 05:47 schrieb .rpv @.***>:
Hi, sorry for the delay, I was using my F030C8 and can't use for this test until I finish a project.
So I didn't tried before to upload using the usart but I just tried and it works fine, here's how I did it:
Put the boot pin to HIGH (1). Connect your USB-TTL to the board using the pinout: PA9->RX, PA10->TX, GND and 3v3 equals. Also, some USB-TTL are dodgy, even when you select 3v3 as the desired working voltage they outputs >4v on their RX/TX pins, so if you can check this before connect it will be great. Select the correct board on the arduino IDE and if there is an option "upload method>STM32CubeProgrammer" pick the "serial" option. Compile and upload the code once arduino IDE says that it's finished, change the boot pin to LOW (0) and press the reset button on the board. This may be required to have it installed, it's a free (of charge) software that you can download on the ST site.
I tested this with the blink sketch and was working.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
The STM32CubeProgrammer, the stlink requires this software in order to be able of make uploads, but I'm not sure if it's required for ttl uploads, the error message makes me think that probably be the case but it's weird that you can do uploads on the blue pill and not on this board.
Hi thanks for the answer Exactly that makes me wonder. Wouldn’t matter if it will run with bluepill settings, but It isn’t. The difference is, there ist a plain serial option for bluepill, unfortunately not for the Stm32f030xx. My guess is with the cubeprogrammer upload is a special instruction set necessary. But really don’t know. But just to be sure you have installed software for the st-link? If you can upload code to the stm32f030 with an usb2ttl it should also work for me. Have to find out where the difference is Between your settings an my one.😎 My best guess ist, that the serial option for the cubeprogrammer uses a customized instruction set for the upload, no matter if you use an usb2ttl or an St-link. The software will adjust the sequences for the chip. Would mean i probably need the real st-link hardware to install the software. Will give it a try. Greetings klaus
Von meinem iPhone gesendet
Am 09.05.2021 um 09:11 schrieb .rpv @.***>:
The STM32CubeProgrammer, the stlink requires this software in order to be able of make uploads, but I'm not sure if it's required for ttl uploads, the error message makes me think that probably be the case but it's weird that you can do uploads on the blue pill and not on this board.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
But just to be sure you have installed software for the st-link?
Yes, for stlink uploads the STM32CubeProgrammer is mandatory, that's why I wasn't sure if this will be available on your menus.
But still, using stlink you just connect it, hit the compile/upload button and that's it, not messing with boot pins, bootloaders, no matter what stm32 flavor nor sequences.
There are some bootloaders that you can load into the bluepill (F3XXXX series, F4XXXX series, MCUs with considerable flash and USB capabilities) that allow you to do uploads through the USB port, that can be really convenient too.
Ok its clear to me, that the Arduino software Looks for the cube software for uploading if i use stm32f030. If it is not there it stops. I will try to install it. What i also not understand is why the chip Is not runnig when flashed as bluepill. It should be the same pinout as i see. I compare it with atmega8 and atmega328. Same pinout, different performance. Obviously you can’t use a wrong chipsetting. Long way to go for me i guess 😂 Greetings
Von meinem iPhone gesendet
Am 09.05.2021 um 22:27 schrieb .rpv @.***>:
But just to be sure you have installed software for the st-link? Yes, for stlink uploads the STM32CubeProgrammer is mandatory, that's why I wasn't sure if this will be available on your menus.
But still, using stlink you just connect it, hit the compile/upload button and that's it, not messing with boot pins, bootloaders, no matter what stm32 flavor nor sequences.
There are some bootloaders that you can load into the bluepill (F3XXXX series, F4XXXX series, MCUs with considerable flash and USB capabilities) that allow you to do uploads through the USB port, that can be really convenient too.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi It works!! Thanks a lot for our help. I installed the STM32cubeprogrammer and after restart of the Arduino IDE I was able to flash the chip with a blink test. There seems to be a different Pin declaration, because just a number 13 don’t work. Has to call the Pin PC13. The other setback is, the usb is not working with Serial.begin(); But this is onl a matter of reading, the most important thing is to get a programm to the chip greetings Klaus
From: .rpv Sent: Sunday, May 9, 2021 10:27 PM To: r-pv/rSTM32F030C8T6_ProMiniPlus Cc: KKuKK ; Author Subject: Re: [r-pv/rSTM32F030C8T6_ProMiniPlus] flash toolchain (#5)
But just to be sure you have installed software for the st-link? Yes, for stlink uploads the STM32CubeProgrammer is mandatory, that's why I wasn't sure if this will be available on your menus.
But still, using stlink you just connect it, hit the compile/upload button and that's it, not messing with boot pins, bootloaders, no matter what stm32 flavor nor sequences.
There are some bootloaders that you can load into the bluepill (F3XXXX series, F4XXXX series, MCUs with considerable flash and USB capabilities) that allow you to do uploads through the USB port, that can be really convenient too.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi again! I made the changes in the board.txt file and add the variant folder as described and wanted to test your code with the tft in the picture. I can only find the folder rSTM32F030C8T6 in which, to be honest, I can see no code for arduino. It looks like assambler, its like chinese to me How can I flash the chip with your demo code with the ST7735 TFT with the Arduino IDE? I searched for a library for this chip and the ST7735 but was not able to compile it. Either not enough flash space, which is weird, because it works for the halve sized atmega328, or it just don’t compile with errors.
I tried the library TFT_eSPI from Bodmer and Arduino_fast_stm from cbm80amiga. TFT_eSPI from Bodmer is to large, even for the simplest program, the ohter has lot of errors.
Thanks for help.
From: .rpv Sent: Sunday, May 9, 2021 10:27 PM To: r-pv/rSTM32F030C8T6_ProMiniPlus Cc: KKuKK ; Author Subject: Re: [r-pv/rSTM32F030C8T6_ProMiniPlus] flash toolchain (#5)
But just to be sure you have installed software for the st-link? Yes, for stlink uploads the STM32CubeProgrammer is mandatory, that's why I wasn't sure if this will be available on your menus.
But still, using stlink you just connect it, hit the compile/upload button and that's it, not messing with boot pins, bootloaders, no matter what stm32 flavor nor sequences.
There are some bootloaders that you can load into the bluepill (F3XXXX series, F4XXXX series, MCUs with considerable flash and USB capabilities) that allow you to do uploads through the USB port, that can be really convenient too.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi, sorry for the late reply.
This boards have 2 usart and the stcore has the software serial library, all works, I can't remember if I've tested the usart 2, but it should work. And I always use the PXX pin nomenclature (PA0, PB1, ..., ), but yes, there is a bit of mess regarding to the pin naming, I think that is inherited from the arduino API.
Regarding the tft, the SPI/I2C and most of the peripherals works fine and on most cases you can use all standard libraries like it was the atmega328p. The problem with the TFT/color libraries it's that are super-optimized for the avr-atmel mcu's and have very basic support for the stm32 mcu's, so when I tested the speed of the displays it's not what you'll expect for a mcu way faster that the avr-atmel. The TFT_eSPI works really well, has support for the stm32 (real support), but the config was a bit different, you have to edit the files of this library, on the User_Setup.h you have to:
And regarding the variant: there is documentation about variants, but that info and my variants are for the st core <2.0, it seems that the stcore v2.0 changes the way that variants are made, but it doesn't matter, because the stcore v2.0 includes support for most the F030XX series, so if you're using the stcore v2.0, please use the included variant instead of mine.
Thanks so much for your help ! Would be lost quite sure.
Pin names: if you know it, its no problem. But it is convenient to use just numbers like on the avr, because you can use for (i=0...) To setup more pins at once. Not a big deal.
Uart: It works if I use serial or serial2. Then I get output on Pin a2, not matter whether i use serial or serial2. Funny. Serial1 and serial3, which should be on the chip are not recognized. Will not compile. For flashing it uses a9,a10 which i cannot use in a program. This is like the arduino mega with 3 serial ports, which i can use with serial1-3. don’t work here with the stm32f030xx
Tft: i already changed the use_setup.h file. Excluding all fonts beside the first one for Reducing size. But it was not enough. The Displaytest program of the tft_eSPI is to large, some 49kb. 😩 I Uncommented the line #define stm32 If this means deleting the //. But could not compile it, too large.
With the lib of cmb80amiga I got a lot of errors while compiling. Most were „Spi write is Not defined „ Remember there was a change in wire.h From write to put and read to get. May be there is a conflict with my existing Wire.h.
Variants: I get now your hints that your Variants are for <2.0.0 The structure of the Variant folder has Changed, also then names, but this was no Problem to fix. But as you mentioned, no need to do anything, because the chip is already included
Tft: so you use for your example on the picture The standard adafruit lib for the tft and it Works without change, but slow. And the bodmer lib is fast and should also work?
Which lib exactly do you use and where can i See the code? I cannot find code for the Arduino ide, just assembler, i guess.
Didn’t thought it would be so hard to get The chip run 😂 Greetings klaus
Von meinem iPhone gesendet
Am 13.05.2021 um 22:31 schrieb .rpv @.***>:
Hi, sorry for the late reply.
This boards have 2 usart and the stcore has the software serial library, all works, I can't remember if I've tested the usart 2, but it should work. And I always use the PXX pin nomenclature (PA0, PB1, ..., ), but yes, there is a bit of mess regarding to the pin naming, I think that is inherited from the arduino API.
Regarding the tft, the SPI/I2C and most of the peripherals works fine and on most cases you can use all standard libraries like it was the atmega328p. The problem with the TFT/color libraries it's that are super-optimized for the avr-atmel mcu's and have very basic support for the stm32 mcu's, so when I tested the speed of the displays it's not what you'll expect for a mcu way faster that the avr-atmel. The TFT_eSPI works really well, has support for the stm32 (real support), but the config was a bit different, you have to edit the files of this library, on the User_Setup.h you have to:
un-comment: #define STM32 select the display driver that you are using. when I tested this library, that version includes all the fonts by default, causing a lot of flash usage, so comment in all the fonts that you aren't using. And regarding the variant: there is documentation about variants, but that info and my variants are for the st core <2.0, it seems that the stcore v2.0 changes the way that variants are made, but it doesn't matter, because the stcore v2.0 includes support for most the F030XX series, so if you're using the stcore v2.0, please use the included variant instead of mine.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi!
So... this board has 2 hardware usart ports, they should work fine even if you use one as the ttl-upload since this port will be used when the board runs on the bootloader and when will be running on flash (your program) the port should be free. There is also 2 extra possibilities:
There are some nice sample sketches for this core: check
Displaytest program of the tft_eSPI is to large, some 49kb.
Yes!, I complain about this a lot, for some reason this series, F030XX, the flash usage it's insane (even compared with other stm32 flavors), a simple clock that uses serial, an i2c library and a led-segmented display can easily take above 16kb!, one solution it's disabling peripherals that you aren't using: read this part.
Also, the v2.0 may have make things worst on this regard, I saw a message on the stm32duino.com forum (or maybe on the github repo) that someone was complaining about the sketch getting 20% bigger on the new core :| I'm still using the 1.9 since I'm working on something and I don't want to add tons of extra variables with a new core :P
With the lib of cmb80amiga
So, here's other part of the stm32duino, the support for stm32 on arduino it's divided into "cores", you may have heard of this...long story short: there are basically 2 types of core:
-ST core, the core that ST themselves are developing. -Libmapple-based cores (most known it's the Roger's Core, but there are a few other flavors of this core).
The libmapple cores starting all of this, but there are not compatible with the STcore and they only support a few boards/mcu's (F103XX line and the F4XXXX line).
So in some cases you'll find libraries for the libmapple-type cores (like the cmb80amiga) and others for the stcore (like the tft_eSPI), that's why you'll get a lot of errors when you try to compile libraries for a different core.
So yes, the tft_eSPI works fine on the stcore but the cmb80amiga won't work on this core.
Now, I use the tft_eSPI on a project that includes 2 MAX6675, 1 MAX44009 and a SD card for logging, the flash consumption was under 55kb, using a F030C8. This without disabling anything, so your problem with the huge flash usage may be related to the new core, but I cant investigate until a few days...
Hi Great answer and a lot stuff to read, lot of new links. This will take long time to check them all.yesterday I got the st-link, very fast Delivery, so in theory nothing should prevent me from programming 🤣
At least I was not completely wrong. The code is indeed very large, even with a small program.
On an attiny you can have code of 2kb running.
I could compile a test code for the tft st7735 With the adafruit_st7735 lib
Now i got a tft screen so i can test it. I did not have to make any changes, so I doubt this will really run.
The reason for me to try the stm chip was the larger flash and sram, not the Speed. I built a cycling computer with gps and eeprom data logging on an atmega32 with 8mhz and it works, but now I am nearly At the finishline regarding flash.
Now I have some doubt whether I can port this code from atmega to stm. There is also a Bmp180 chip for height and temperature built in.
If every lib like the tft libs are so conflicted with the stm it will be a hard ride 😳 Greetings klaus
Von meinem iPhone gesendet
Am 19.05.2021 um 01:16 schrieb .rpv @.***>:
Hi!
So... this board has 2 hardware usart ports, they should work fine even if you use one as the ttl-upload since this port will be used when the board runs on the bootloader and when will be running on flash (your program) the port should be free. There is also 2 extra possibilities:
You can use the SoftwareSerial library, this will create a virtual serial on any of 2 free pins you choose. You can remap some of the pins of the usart/i2c/spi, the ST core has this as option check the documentation So you can use the normal pins for the ttl-upload and the remap pins for your normal program operations. But this has limitations: 1. there are just 2 (normally) set of pins, 2. ports are in sets so those pins aren't interchangeable, you has to choose between a pair/set or the other. There are some nice sample sketches for this core: check
Displaytest program of the tft_eSPI is to large, some 49kb.
Yes!, I complain about this a lot, for some reason this series, F030XX, the flash usage it's insane (even compared with other stm32 flavors), a simple clock that uses serial, an i2c library and a led-segmented display can easily take above 16kb!, one solution it's disabling peripherals that you aren't using: read this part.
Also, the v2.0 may have make things worst on this regard, I saw a message on the stm32duino.com forum (or maybe on the github repo) that someone was complaining about the sketch getting 20% bigger on the new core :| I'm still using the 1.9 since I'm working on something and I don't want to add tons of extra variables with a new core :P
With the lib of cmb80amiga
So, here's other part of the stm32duino, the support for stm32 on arduino it's divided into "cores", you may have heard of this...long story short: there are basically 2 types of core:
-ST core, the core that ST themselves are developing. -Libmapple-based cores (most known it's the Roger's Core, but there are a few other flavors of this core).
The libmapple cores starting all of this, but there are not compatible with the STcore and they only support a few boards/mcu's (F103XX line and the F4XXXX line).
So in some cases you'll find libraries for the libmapple-type cores (like the cmb80amiga) and others for the stcore (like the tft_eSPI), that's why you'll get a lot of errors when you try to compile libraries for a different core.
So yes, the tft_eSPI works fine on the stcore but the cmb80amiga won't work on this core.
Now, I use the tft_eSPI on a project that includes 2 MAX6675, 1 MAX44009 and a SD card for logging, the flash consumption was under 55kb, using a F030C8. This without disabling anything, so your problem with the huge flash usage may be related to the new core, but I cant investigate until a few days...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I use the F030F4 as the stm32 attiny, it's a tssop20 package with 16kb of flash, but depending on what peripherals you use it feels like an atmega328p of 512b-1kb flash, sadly ST didn't have any mcu of a sot-23 o similar size package.
To me the sale point of the stm32 it's that you have like a hundred mcu's to choose with all the combinations possibles: low power/consumption, dacs, adc 16bits, crypto, dfu, giant flash sizes (up to 1mb), fast clocks (at least 480mhz), etc.
The stcore compatibility with the arduino api it's really great overall, you don't find a lot of problems with libraries, there is this particularly case with the tft library because it has to send a lot of data as fast as possible and due to the same compatibility most of the speeds are set by default at the avr-atmel values, the adc y pwm channels also are set by default at 10bit and 8bit respectively when this are at least 12bit and 16bit on all stm32 series (on the api documentation says how to change it).
But libraries, like the u8g2 runs fast and perfectly on the f030 and all the stm32 mcu's that I have tested on both hardware i2c and spi, I just don't have tested the software i2c but probably it's a nono anyways.
There's other library that gave me a lot of problems and I didn't make it work on the f030's, was the IR remote library, so timer-related libraries may also be an issue, I haven't tried again though.
Thanks for your very helpful answers
There is obviously no really one perfect chip. It took quite some time To make stuff with the atmel chips and I still more or less are a dependend arduino Ide or platformio ide user. With the new stm chip I realized how much work really has to Be done to program such chips. All the basic configuration are already done I asume In the core files.
Good to know that the adc is 10 bit configured, not 12! Good to know that most libs are working for stm!
You mentioned the different core for cmb80amiga libs. Is there an easy way to integrate this core in arduino, too? If these basics are not set up properly, I don't think I would have any success.
It took me a long time to get a simple rf 433mhz chip with all different atmel Chips to communicate. Even for atmel chips the timing is only to be done, if you look into The data sheet of ever single chip.
Don't think I can make it again with stm🤓 I will take it slowly, no need to hurry. But now I bought the stm, so I have to look how to make something out of it.
It took me a lot of research to make it with the eps8266 chips, too. Its a really Challenging stuff. But here you have the additional problem of ever changing Internet standards and ever changing cores. It's like alice in wonderland, if you stop Running, everything stops working.
I made some intenet handys to easy get hand on some infos from websites. Since I made it work, two times all was dead, when the websites changed the Security protocols. Not to mention the permanent changes made to the appearance Of the website., so you have permanently change the parsing 😫😖 But always fun if it works.
Greetings klaus
Am 20.05.2021 um 04:51 schrieb .rpv @.***>:
I use the F030F4 as the stm32 attiny, it's a tssop20 package with 16kb of flash, but depending on what peripherals you use it feels like an atmega328p of 512b-1kb flash, sadly ST didn't have any mcu of a sot-23 o similar size package.
To me the sale point of the stm32 it's that you have like a hundred mcu's to choose with all the combinations possibles: low power/consumption, dacs, adc 16bits, crypto, dfu, giant flash sizes (up to 1mb), fast clocks (at least 480mhz), etc.
The stcore compatibility with the arduino api it's really great overall, you don't find a lot of problems with libraries, there is this particularly case with the tft library because it has to send a lot of data as fast as possible and due to the same compatibility most of the speeds are set by default at the avr-atmel values, the adc y pwm channels also are set by default at 10bit and 8bit respectively when this are at least 12bit and 16bit on all stm32 series (on the api documentation says how to change it).
But libraries, like the u8g2 runs fast and perfectly on the f030 and all the stm32 mcu's that I have tested on both hardware i2c and spi, I just don't have tested the software i2c but probably it's a nono anyways.
There's other library that gave me a lot of problems and I didn't make it work on the f030's, was the IR remote library, so timer-related libraries may also be an issue, I haven't tried again though.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Yes, but to change default stuff on the stcore isn't complicated:
analogReadResolution(12);//changes the adc resolution to 12 bits
analogWriteFrequency(1000);//changes the pwm frequency to 1000...1khz
//I haven't tested this, but it should work:
analogWriteResolution(12);//changes the pwm resolution to 12bit (and up to 16bit)
changing the speed of serial it's the standard way, the i2c it's:
Wire.setClock(1000000);//set the speed at 1mhz, default it's at 100khz
Wire.begin();
the spi speed on the stm32 can go up to 50% of the clock speed, the f030 clock can go up to 48mhz so 24mhz it's the max speed of the spi, on the f103 the max clock it's 72mhz so max 36mhz spi.
all the free pins can be used as input/outputs and as interrupts.
You mentioned the different core for cmb80amiga libs. Is there an easy way to integrate this core in arduino, too? If these basics are not set up properly, I don't think I would have any success.
Yes, the installation it's the same as the stcore, here it's the Roger's Core repo but I think that you can't have both cores installed at the same time, also remember that the libmapple cores doesn't support the f030 series, you'll have to use a bluepill (f103 cc/c8/ve/ze series), there's also support for some mcu's of the f4xxxx series, but I don't have idea which ones, probably the black pill (f411ce). Also, be aware of the libmapple core may not be compatible with the previous info, as example: it's a while now since I don't use Roger's Core, but back then using the pwm output was using:
pwmWrite(PB1,128);
while the stcore it's the standar way:
analogWrite(PB1,128);
So using libmapple cores may take a bit more work.
Don't think I can make it again with stmnerd_face
Yes, I feel you, changing platform can be really exhaustive and sometimes ended not been useful or not something that you'll like. So you really have to evaluate this according to your needs.
Hi
Thanks, really very helpful.
I will not try the other core, I don’t think It’s worth to me. I don’t plan to buy a bluepill Right now, they are getting really expensive.
I just need to make it run with any tft lib With an ili9163 or a QDTech.
At least the blink program works, so Theoretically I should be able to make it.
Greetings klaus
Von meinem iPhone gesendet
Am 21.05.2021 um 05:17 schrieb .rpv @.***>:
Yes, but to change default stuff on the stcore isn't complicated:
analogReadResolution(12);//changes the adc resolution to 12 bits analogWriteFrequency(1000);//changes the pwm frequency to 1000...1khz //I haven't tested this, but it should work: analogWriteResolution(12);//changes the pwm resolution to 12bit (and up to 16bit) changing the speed of serial it's the standard way, the i2c it's:
Wire.setClock(1000000);//set the speed at 1mhz, default it's at 100khz Wire.begin(); the spi speed on the stm32 can go up to 50% of the clock speed, the f030 clock can go up to 48mhz so 24mhz it's the max speed of the spi, on the f103 the max clock it's 72mhz so max 36mhz spi.
all the free pins can be used as input/outputs and as interrupts.
You mentioned the different core for cmb80amiga libs. Is there an easy way to integrate this core in arduino, too? If these basics are not set up properly, I don't think I would have any success.
Yes, the installation it's the same as the stcore, here it's the Roger's Core repo but I think that you can't have both cores installed at the same time, also remember that the libmapple cores doesn't support the f030 series, you'll have to use a bluepill (f103 cc/c8/ve/ze series), there's also support for some mcu's of the f4xxxx series, but I don't have idea which ones, probably the black pill (f411ce). Also, be aware of the libmapple core may not be compatible with the previous info, as example: it's a while now since I don't use Roger's Core, but back then using the pwm output was using:
pwmWrite(PB1,128);
while the stcore it's the standar way:
analogWrite(PB1,128);
So using libmapple cores may take a bit more work.
Don't think I can make it again with stmnerd_face
Yes, I feel you, changing platform can be really exhaustive and sometimes ended not been useful or not something that you'll like. So you really have to evaluate this according to your needs.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi again I finally flashed my stm32f030xx with the St-link. It’s very easy and fast, so The basic should work. I tried now the tft_eSPI with an ili9163, which Theoretically should work. As I can see I uncommented all lines correct and set the CS, DS,RST to PINS to PA5, PA6 and PA7, the SPI to 2 and SDA - PB15 CLK - PB13 But the screen is just white, nothings happens. I add some line for the PC13 LED to blink after setup, which works. So at least The code was flashed correctly. A strange thing occurred, the Led is on when Low and off when high. This is the opposite I would expect. If this Happened to all PINS then all cannot work. Is this a special thing with the LED like the ESP8266? There it is the same. Led on when Pin low. One thing to the IR lib you mentioned which you cannot run, because of timing issues. These days I have to repair a chip for a rf 430mhz chip with Manchester lib. After flashing the chip nothing works, I could not receive anything. Took me hours to no avail. All seems like it should be. I nearly gave up, but suddenly I had the idea to flash the code from my old Win XP Notebook where I Originally wrote the code. And it works at once. So it was no issue of the hardware or My coding, it is all about different Manchester lib versions. The new one doesn’t work, cannot find the difference. So trying older IR LIB may do it. Greetings klaus
Von meinem iPhone gesendet
Am 21.05.2021 um 09:43 schrieb Klaus Kreutzer @.***>:
Hi
Thanks, really very helpful.
I will not try the other core, I don’t think It’s worth to me. I don’t plan to buy a bluepill Right now, they are getting really expensive.
I just need to make it run with any tft lib With an ili9163 or a QDTech.
At least the blink program works, so Theoretically I should be able to make it.
Greetings klaus
Von meinem iPhone gesendet
Am 21.05.2021 um 05:17 schrieb .rpv @.***>:
Yes, but to change default stuff on the stcore isn't complicated:
analogReadResolution(12);//changes the adc resolution to 12 bits analogWriteFrequency(1000);//changes the pwm frequency to 1000...1khz //I haven't tested this, but it should work: analogWriteResolution(12);//changes the pwm resolution to 12bit (and up to 16bit) changing the speed of serial it's the standard way, the i2c it's:
Wire.setClock(1000000);//set the speed at 1mhz, default it's at 100khz Wire.begin(); the spi speed on the stm32 can go up to 50% of the clock speed, the f030 clock can go up to 48mhz so 24mhz it's the max speed of the spi, on the f103 the max clock it's 72mhz so max 36mhz spi.
all the free pins can be used as input/outputs and as interrupts.
You mentioned the different core for cmb80amiga libs. Is there an easy way to integrate this core in arduino, too? If these basics are not set up properly, I don't think I would have any success.
Yes, the installation it's the same as the stcore, here it's the Roger's Core repo but I think that you can't have both cores installed at the same time, also remember that the libmapple cores doesn't support the f030 series, you'll have to use a bluepill (f103 cc/c8/ve/ze series), there's also support for some mcu's of the f4xxxx series, but I don't have idea which ones, probably the black pill (f411ce). Also, be aware of the libmapple core may not be compatible with the previous info, as example: it's a while now since I don't use Roger's Core, but back then using the pwm output was using:
pwmWrite(PB1,128);
while the stcore it's the standar way:
analogWrite(PB1,128);
So using libmapple cores may take a bit more work.
Don't think I can make it again with stmnerd_face
Yes, I feel you, changing platform can be really exhaustive and sometimes ended not been useful or not something that you'll like. So you really have to evaluate this according to your needs.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi!,
White screen means faulty connection and/or wrong display driver. If I remember correctly, when I use this library you can't choose freely the pins, for some reason you've to use a set of pins, I don't know if this has changed, maybe not. I attached an schematic of the pins I used, the contructor I used it's:
TFT_eSPI _s=TFT_eSPI();
Use this pinout and let's see if it works.
Hi Ok thanks, I will try it. Greetings klaus
Von meinem iPhone gesendet
Am 28.05.2021 um 11:06 schrieb .rpv @.***>:
Hi!,
White screen means faulty connection and/or wrong display driver. If I remember correctly, when I use this library you can't choose freely the pins, for some reason you've to use a set of pins, I don't know if this has changed, maybe not. I attached an schematic of the pins I used, the contructor I used it's:
TFT_eSPI _s=TFT_eSPI();
rMeterST_kc.pdf
Use this pinout and let's see if it works.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi I see you are using SPI1, the User_setup.h uses SPI2, it is the faster one.
To Code size:
I tried first the Life example, but could not compile it, because the linker failed because of memory shortage. Over all the code for the stm32 is way larger then for the avr chips. I never had the problem of not enough memory for the examples. You mentioned I should deselect some functions in the core. The trade-off seems not too big to me in regard to the flash size of the stm32 if the Minimal code is larger. Greetings klaus
Von meinem iPhone gesendet
Am 28.05.2021 um 11:06 schrieb .rpv @.***>:
Hi!,
White screen means faulty connection and/or wrong display driver. If I remember correctly, when I use this library you can't choose freely the pins, for some reason you've to use a set of pins, I don't know if this has changed, maybe not. I attached an schematic of the pins I used, the contructor I used it's:
TFT_eSPI _s=TFT_eSPI();
rMeterST_kc.pdf
Use this pinout and let's see if it works.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
HI IT WORKS!!!!! Great thanks for your help!!!! Would never made it so fast without you. Thanks a lot. Big step made to stm 👍😁😁 It’s very fast. Absolute great. Greetings klaus
Von meinem iPhone gesendet
Am 28.05.2021 um 12:31 schrieb Klaus Kreutzer @.***>:
Hi Ok thanks, I will try it. Greetings klaus
Von meinem iPhone gesendet
Am 28.05.2021 um 11:06 schrieb .rpv @.***>:
Hi!,
White screen means faulty connection and/or wrong display driver. If I remember correctly, when I use this library you can't choose freely the pins, for some reason you've to use a set of pins, I don't know if this has changed, maybe not. I attached an schematic of the pins I used, the contructor I used it's:
TFT_eSPI _s=TFT_eSPI();
rMeterST_kc.pdf
Use this pinout and let's see if it works.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi Stm got me really fast, it’s so fast flashing you really cannot see it, so easy no jumper here and there, immediately running after flashing. I am Stuck right away 😎😉 Thanks a lot for your time.
I flashed all examples of tft_eSPI , all are working except the one with the jpg pics and the jpgdecoder lib. This is what I like to ask. It stops compiling with the error „avr/io.h not found no such file or directory“. This is an error that occurs so often which I Don’t understand. Because this file is at least 5 times in my folders. What makes me extra wonder is the fact, that this is a file for avr Chips. The stm should not Look for it. Seems to me messed up core files like spi.h or something like that. This is so often the end of my effort, it would be great to understand the reason. Thanks again for you help so far Greetings klaus
Von meinem iPhone gesendet
Am 28.05.2021 um 12:31 schrieb Klaus Kreutzer @.***>:
Hi Ok thanks, I will try it. Greetings klaus
Von meinem iPhone gesendet
Am 28.05.2021 um 11:06 schrieb .rpv @.***>:
Hi!,
White screen means faulty connection and/or wrong display driver. If I remember correctly, when I use this library you can't choose freely the pins, for some reason you've to use a set of pins, I don't know if this has changed, maybe not. I attached an schematic of the pins I used, the contructor I used it's:
TFT_eSPI _s=TFT_eSPI();
rMeterST_kc.pdf
Use this pinout and let's see if it works.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi!
Glad it worked out!. I remember that one or two examples also didn't ran but since my sketch was working I didn't investigated any further 😏
And yes, to me stlink it's the way to go with stm32 uploads, it's just the easiest way: no messing with boot pins, bootloaders or sequences, but sadly stlink doesn't create a serial protocol (like for debugging), stlink supports real debugging but arduino IDE won't, on stm32cubeide (the stm32 kind of official IDE) you can use stlink for debugging, you can see the values of your variables on real time!, maybe one day this will be ported to arduino IDE...
BTW, when I mention the timers I was referring to libraries that are using the hardware timers directly may give you problems, libraries that are using timer-based functions (like delay(), delaymicroseconds, millis(), etc. ) all those should work fine.
Hi I will look for the stm ide, it's like atmel studio, you can debugg there,too. I think it can work with platformio. Timer I ment the real hardware timer you must set up in the registers. This is what you need for manchester code and ir code. Greetings klaus Von meinem iPad gesendet
Am 30.05.2021 um 03:09 schrieb .rpv @.***>:
Hi!
Glad it worked out!. I remember that one or two examples also didn't ran but since my sketch was working I didn't investigated any further 😏
And yes, to me stlink it's the way to go with stm32 uploads, it's just the easiest way: no messing with boot pins, bootloaders or sequences, but sadly stlink doesn't create a serial protocol (like for debugging), stlink supports real debugging but arduino IDE won't, on stm32cubeide (the stm32 kind of official IDE) you can use stlink for debugging, you can see the values of your variables on real time!, maybe one day this will be ported to arduino IDE...
BTW, when I mention the timers I was referring to libraries that are using the hardware timers directly may give you problems, libraries that are using timer-based functions (like delay(), delaymicroseconds, millis(), etc. ) all those should work fine.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi again My enthusiasm is fast gone. 😩
I ported my cycling computer code now, and Nearly all compiled, the lib for gps, external eeprom, bmp180 and ili9163, except the Battery voltage which needs completely Other code.
But here comes the miracle. The code is 9kb too large! The chip has double the flash of an atmega328 and the same code is 73kb large, Compared to 30,5 kb an an atmega328?
That’s crazy. I figured out, when I use the option „Smallest with LTO“ then it fits exactly. Takes 64,5kb. In the end it’s no advantage, double in flash but double codesize.
I am stunned and have no clue who this can be. You mentioned I have to shut down stuff but I don’t see what I don’t need. I need Usb, I2C, SPI, nothing much left to be deactivated. Seems bot the best code efficiency. Greetings klaus
Von meinem iPhone gesendet
Am 30.05.2021 um 04:38 schrieb klaus kreutzer @.***>:
Hi I will look for the stm ide, it's like atmel studio, you can debugg there,too. I think it can work with platformio. Timer I ment the real hardware timer you must set up in the registers. This is what you need for manchester code and ir code. Greetings klaus Von meinem iPad gesendet
Am 30.05.2021 um 03:09 schrieb .rpv @.***>:
Hi!
Glad it worked out!. I remember that one or two examples also didn't ran but since my sketch was working I didn't investigated any further 😏
And yes, to me stlink it's the way to go with stm32 uploads, it's just the easiest way: no messing with boot pins, bootloaders or sequences, but sadly stlink doesn't create a serial protocol (like for debugging), stlink supports real debugging but arduino IDE won't, on stm32cubeide (the stm32 kind of official IDE) you can use stlink for debugging, you can see the values of your variables on real time!, maybe one day this will be ported to arduino IDE...
BTW, when I mention the timers I was referring to libraries that are using the hardware timers directly may give you problems, libraries that are using timer-based functions (like delay(), delaymicroseconds, millis(), etc. ) all those should work fine.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Sorry to hear that.
Yes, you can disable stuff to gain some flash, I'll disable the serial (this will give you like 1-2kb) and if you aren't using the hardware timers directly or pwm channels you can disable the timer module (#define HAL_TIM_MODULE_DISABLED this will give you like 5kb-10kb). After this you can try to optimize your code, but overall yes, the flash usage on this particular line (F030) it's insane, this may be exaggerating by the new core, your code or both.
For voltage, there is an example on the documentation on how to use the internal voltage reference as well other of the internal channels, like the internal temperature.
Can you compile the blink example to see if we get similar flash/ram usage?, I got this:
Sketch uses 10548 bytes (16%) of program storage space. Maximum is 65536 bytes.
Global variables use 928 bytes (11%) of dynamic memory, leaving 7264 bytes for local variables. Maximum is 8192 bytes.
on Arduino IDE 1.8.12 and STcore 1.9 with all initial values and without disabling anything.
Hi Not you fault 😜🤓 I will run the blink. Good idea, I remember 13.5 kb, I will check it today. I remember because I wondered about this large flash for blinking a led. This is in the end less flash space on a stm32 then on the atmega328. But this was my first try, so no wonder it is not perfect.
I found code for the internal voltage, horrible register manipulation. Not too important, can live without.
Don't I need the timer at least for delay? I read about interrupt handler with use Much space, but I need 2. I don't need pwm, that's a try. I need serial, for the Gps, and the data transmission to the Pc.
I read there are three libs for the core, Hal which uses Arduino, LL and another one with the smallest resources. But I don't see how to Choose it in the arduino ide. There is a Stm32CubeF0 Firmware where I can choose the lib, have no idea how To use it with arduino.
So do you think a bluepill will be less resource hungry?
Maybe there is a way to reduce the flash size. 10kb would be enough to make sence to change to stm. Choosing option -Os with LTO reduces the size be 10kb, so it is possible. Like this it don't make any sense, but of course it is much faster Then an atmega328. I use it at internal 8mhz, which is fine .
Ok here are the blink values. Arduino 1.8.8 , generic F030C8Tx , -Os default Flash is 11136 byte. Just 4 line of code Led 0 Delay Led1 Delay
Choosing Option -Os with LTO reduce the flash to 7988 byte but the program is Not running, so this option is no choice. Means I cannot compile my code, with the Default option it is 74kb, without not running. Stuck 😬😜
Thanks for your help. Great relief.
Greetings klaus
Am 30.05.2021 um 22:37 schrieb .rpv @.***>:
Sorry to hear that.
Yes, you can disable stuff to gain some flash, I'll disable the serial (this will give you like 1-2kb) and if you aren't using the hardware timers directly or pwm channels you can disable the timer module (#define HAL_TIM_MODULE_DISABLED this will give you like 5kb-10kb). After this you can try to optimize your code, but overall yes, the flash usage on this particular line (F030) it's insane, this may be exaggerating by the new core, your code or both.
For voltage, there is an example on the documentation on how to use the internal voltage reference as well other of the internal channels, like the internal temperature.
Can you compile the blink example to see if we get similar flash/ram usage?, I got this:
Sketch uses 10548 bytes (16%) of program storage space. Maximum is 65536 bytes. Global variables use 928 bytes (11%) of dynamic memory, leaving 7264 bytes for local variables. Maximum is 8192 bytes. on Arduino IDE 1.8.12 and STcore 1.9 with all initial values and without disabling anything.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi
Don't I need the timer at least for delay? I read about interrupt handler with use
For delay() and other timer-based functions, no, you won't need the timer module, for interrupts I haven't tried.
So do you think a bluepill will be less resource hungry?
You can test it, just change the board on arduino IDE and compile it, but yes, it should be a smaller flash usage, the thing will be to see how much small will be.
Flash is 11136 byte.
so isn't considerable bigger usage.
define HAL_TIM_MODULE_DISABLED has no effect .
Just to be sure, you did put that line on a separate _hal_confextra.h file, right?, I remember that changing/creating this file may require an arduino IDE restart.
There are other ways to optimize code, like avoiding to use INT (int range it's way bigger on 32bit platforms than on 8bit) so using byte, short or unsigned short instead of int can give you a few kb (or using their C++ AKAs: int8_t,uint8_t,int16_t,uint16_t). Using float/double also have a way bigger impact on the f030 line.
Hi thanks for the info
No, I put it on top of the blink😩😳 Will try it as you described.
I thought about float and double, may be I can avoid it. Didn’t thought Int would make A difference. I have to test this in a small Program which effect the different types have on a 32bit cpu. I know on 8bit the Use of double or float need 2kb extra.
I see, it will be more complicated than just Change some code lines. I use the RAM for Var, metadata, settings and menu text. This also will Not work. Need an extra external eeprom. Not a one week action. Have to start smaller, At least, thanks to you, the flashing works and a tft is working, too. Good starting point. Greetings klaus
Von meinem iPhone gesendet
Am 31.05.2021 um 09:56 schrieb .rpv @.***>:
define HAL_TIM_MODULE_DISABLED has no effect .
Hi
Can find all moduls in
Stm32f0xx_hal_conf_default.h
Like can,adc,smartcard,wwdg
I will play around here to see what happens with size and functionality.
Commented out
Can
Adc
Smartcard
Wwdg
Tim
Restart arduino
Same size.
I compiled it with stm32f103c serie
14240 byte
Way larger.
It’s a heck of a code in the stm folder.
There are folders for CMSIS and LL,
Which should be smaller, but I don’t see
A possibility to choose between HAL and
The others.
OMG the code which I write in the Arduino
Editor is not more than 1% of the whole code
Needed.
This is highly complex.
Greetings klaus
Von meinem iPhone gesendet
Am 31.05.2021 um 18:37 schrieb Klaus Kreutzer @.***>:
Hi thanks for the info
define HAL_TIM_MODULE_DISABLED has no effect .
No, I put it on top of the blink😩😳 Will try it as you described.
I thought about float and double, may be I can avoid it. Didn’t thought Int would make A difference. I have to test this in a small Program which effect the different types have on a 32bit cpu. I know on 8bit the Use of double or float need 2kb extra.
I see, it will be more complicated than just Change some code lines. I use the RAM for Var, metadata, settings and menu text. This also will Not work. Need an extra external eeprom. Not a one week action. Have to start smaller, At least, thanks to you, the flashing works and a tft is working, too. Good starting point. Greetings klaus
Von meinem iPhone gesendet
Am 31.05.2021 um 09:56 schrieb .rpv @.***>:
define HAL_TIM_MODULE_DISABLED has no effect .
Well, seems that you already hit the ceiling, I think that you should go for the BlackPill:
The 401 blackpill will have 256kb and the 411 512kb, sadly the prices went crazy since covid times.
Moving from the f030 to the f4XX it's easy.
You name it. Prices are skyrocketing in the last weeks. Even my one tripled. The bluepill went from 1.5€ to 12€. Makes no Sense with my actual knowledge. Will try to make the best out of my one First. Bought 3 for 5€. Greetings klaus
Von meinem iPhone gesendet
Am 31.05.2021 um 22:01 schrieb .rpv @.***>:
Well, seems that you already hit the ceiling, I think that you should go for the BlackPill:
The 401 blackpill will have 256kb and the 411 512kb, sadly the prices went crazy since covid times.
Moving from the f030 to the f4XX it's easy.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Not really expensive 3,2€ for so much power Is ok. The amtega328 is not cheaper. I am Thinking about it. I Take it as a challenge to get my code on the Stm32f030😂😉 Looks not very promising, right now. 🥶🥴 Greetings
Von meinem iPhone gesendet
Am 31.05.2021 um 23:01 schrieb Klaus Kreutzer @.***>:
You name it. Prices are skyrocketing in the last weeks. Even my one tripled. The bluepill went from 1.5€ to 12€. Makes no Sense with my actual knowledge. Will try to make the best out of my one First. Bought 3 for 5€. Greetings klaus
Von meinem iPhone gesendet
Am 31.05.2021 um 22:01 schrieb .rpv @.***>:
Well, seems that you already hit the ceiling, I think that you should go for the BlackPill:
The 401 blackpill will have 256kb and the 411 512kb, sadly the prices went crazy since covid times.
Moving from the f030 to the f4XX it's easy.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi A correction: if I disable all modules in the Hal_conf_extra.h then the blink shrink to 7,5kb instead of 11,4kb, nearly 40% reduction. If I try the same with my code I earn a lot of Errors. They are connected to hardwaretimer in softwareserial. I don’t know which modul I need. There are to much for try and error, maybe interdependent. But at least a reduction is possible. Greetings klaus
Von meinem iPhone gesendet
Am 31.05.2021 um 23:01 schrieb Klaus Kreutzer @.***>:
You name it. Prices are skyrocketing in the last weeks. Even my one tripled. The bluepill went from 1.5€ to 12€. Makes no Sense with my actual knowledge. Will try to make the best out of my one First. Bought 3 for 5€. Greetings klaus
Von meinem iPhone gesendet
Am 31.05.2021 um 22:01 schrieb .rpv @.***>:
Well, seems that you already hit the ceiling, I think that you should go for the BlackPill:
The 401 blackpill will have 256kb and the 411 512kb, sadly the prices went crazy since covid times.
Moving from the f030 to the f4XX it's easy.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
the blink example, disabling everything should be under 4kb.
When you use the hal_conf_extra.h file you need to restart arduino ide when you do changes otherwise the flash usage seems unaffected.
I got this values:
F030F4:
Sketch uses 3716 bytes (22%) of program storage space. Maximum is 16384 bytes.
Global variables use 64 bytes (1%) of dynamic memory, leaving 4032 bytes for local variables. Maximum is 4096 bytes.
F030K6:
Sketch uses 3660 bytes (11%) of program storage space. Maximum is 32768 bytes.
Global variables use 64 bytes (1%) of dynamic memory, leaving 4032 bytes for local variables. Maximum is 4096 bytes.
F030C8:
Sketch uses 4028 bytes (6%) of program storage space. Maximum is 65536 bytes.
Global variables use 64 bytes (0%) of dynamic memory, leaving 8128 bytes for local variables. Maximum is 8192 bytes.
BluePill:
Sketch uses 4200 bytes (3%) of program storage space. Maximum is 131072 bytes.
Global variables use 64 bytes (0%) of dynamic memory, leaving 20416 bytes for local variables. Maximum is 20480 bytes.
F411CE:
Sketch uses 4440 bytes (0%) of program storage space. Maximum is 524288 bytes.
Global variables use 68 bytes (0%) of dynamic memory, leaving 131004 bytes for local variables. Maximum is 131072 bytes.
F405RG:
Sketch uses 4488 bytes (0%) of program storage space. Maximum is 1048576 bytes.
Global variables use 80 bytes (0%) of dynamic memory, leaving 196528 bytes for local variables. Maximum is 196608 bytes.
Hi Ok, still too large. I have the hal_conf_extra.h In the sketch ordner, it will be loaded in the ide and seams to be compiled new when changed.
Von meinem iPhone gesendet
Am 01.06.2021 um 22:01 schrieb .rpv @.***>:
the blink example, disabling everything should be under 4kb.
When you use the hal_conf_extra.h file you need to restart arduino ide when you do changes otherwise the flash usage seems unaffected.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Wau a lot of different chips, I am still double In size. May be its the core 2.0.0 I disabled even more modules, except the QSpi. Doesn’t matter, if I disable all, you can do it with HAL_MOULES_DISABLE, then my code Will not compile. Greetings
Von meinem iPhone gesendet
Am 02.06.2021 um 01:30 schrieb .rpv @.***>:
I got this values:
F030F4:
Sketch uses 3716 bytes (22%) of program storage space. Maximum is 16384 bytes. Global variables use 64 bytes (1%) of dynamic memory, leaving 4032 bytes for local variables. Maximum is 4096 bytes. F030K6:
Sketch uses 3660 bytes (11%) of program storage space. Maximum is 32768 bytes. Global variables use 64 bytes (1%) of dynamic memory, leaving 4032 bytes for local variables. Maximum is 4096 bytes. F030C8:
Sketch uses 4028 bytes (6%) of program storage space. Maximum is 65536 bytes. Global variables use 64 bytes (0%) of dynamic memory, leaving 8128 bytes for local variables. Maximum is 8192 bytes. BluePill:
Sketch uses 4200 bytes (3%) of program storage space. Maximum is 131072 bytes. Global variables use 64 bytes (0%) of dynamic memory, leaving 20416 bytes for local variables. Maximum is 20480 bytes. F411CE:
Sketch uses 4440 bytes (0%) of program storage space. Maximum is 524288 bytes. Global variables use 68 bytes (0%) of dynamic memory, leaving 131004 bytes for local variables. Maximum is 131072 bytes. F405RG:
Sketch uses 4488 bytes (0%) of program storage space. Maximum is 1048576 bytes. Global variables use 80 bytes (0%) of dynamic memory, leaving 196528 bytes for local variables. Maximum is 196608 bytes. blink.zip
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Bluepill without usb 5048 byte, moving closer Still too much. Guess it’s the Core version. Don’t See other reason right now. If you change just one board setting, you don’t need a restart. All will be compiled new.
Ok smt32f030 without usb and with -Os and LTO it’s 1688 byte, without LTO 4384 bytes. Getting closer. Unfortunately the chip is not Running with LTO. Greetings
Von meinem iPhone gesendet
Am 02.06.2021 um 09:32 schrieb Klaus Kreutzer @.***>:
Wau a lot of different chips, I am still double In size. May be its the core 2.0.0 I disabled even more modules, except the QSpi. Doesn’t matter, if I disable all, you can do it with HAL_MOULES_DISABLE, then my code Will not compile. Greetings
Von meinem iPhone gesendet
Am 02.06.2021 um 01:30 schrieb .rpv @.***>:
I got this values:
F030F4:
Sketch uses 3716 bytes (22%) of program storage space. Maximum is 16384 bytes. Global variables use 64 bytes (1%) of dynamic memory, leaving 4032 bytes for local variables. Maximum is 4096 bytes. F030K6:
Sketch uses 3660 bytes (11%) of program storage space. Maximum is 32768 bytes. Global variables use 64 bytes (1%) of dynamic memory, leaving 4032 bytes for local variables. Maximum is 4096 bytes. F030C8:
Sketch uses 4028 bytes (6%) of program storage space. Maximum is 65536 bytes. Global variables use 64 bytes (0%) of dynamic memory, leaving 8128 bytes for local variables. Maximum is 8192 bytes. BluePill:
Sketch uses 4200 bytes (3%) of program storage space. Maximum is 131072 bytes. Global variables use 64 bytes (0%) of dynamic memory, leaving 20416 bytes for local variables. Maximum is 20480 bytes. F411CE:
Sketch uses 4440 bytes (0%) of program storage space. Maximum is 524288 bytes. Global variables use 68 bytes (0%) of dynamic memory, leaving 131004 bytes for local variables. Maximum is 131072 bytes. F405RG:
Sketch uses 4488 bytes (0%) of program storage space. Maximum is 1048576 bytes. Global variables use 80 bytes (0%) of dynamic memory, leaving 196528 bytes for local variables. Maximum is 196608 bytes. blink.zip
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi
I agree, the extra usage must be related to the new core 2.0.
BTW, when I first saw this problem, the insane flash usage, first thing that I tried was to use stm32cubeide to program the f030 mcu's, but the result on flash usage was pretty similar to arduino ide (but with a lot of extra work needed), the peripheral libraries are the same on both ide's and are heavy, what you can try it's to disable the hardware peripherals (like i2c) and using software emulation (when be possible), I think it's called "bitbanging", on most sensors won't make a difference, using this method I was able to use an OLED display on the F030F4 (16kb), by "using" it was just printing a few text and that's about it, but using standard peripheral libraries it's just not possible.
Hi Thanks for the hint with stm32cubeide, I already tried to download the software, but you have to open an account with a lot of info to submit. So I stepped back for thinking.
If there's no advantage then I can spare this step, would be a waist of time. Unfortunately I need all peripherals for the cycling computer. Never heard of bitbanging, will look into it.😬 Now I am quite sure, this is not a matter of some days, even not weeks, more like month To get this working.
My first steps will be checking all variables and changing all int, word, long, double and Float in uint_ t ... The problem is, In the end I have to overlook all used external lib And there includes for this type of variables, because I asume they all use standard int or word or long.
Can't avoid double, because it is used in the adafruit bmp180 lib.
Maybe it's better to start the whole code step by step from zero to see where the flash size starts growing.
I have the basic running with the tft ili9163, but all the tft_eSPI examples are also quite large on its own.
The stm32f411 or f401 would be the easiest solution.
Greetings klaus
Von meinem iPad gesendet
Am 03.06.2021 um 02:04 schrieb .rpv @.***>:
Hi
I agree, the extra usage must be related to the new core 2.0.
BTW, when I first saw this problem, the insane flash usage, first thing that I tried was to use stm32cubeide to program the f030 mcu's, but the result on flash usage was pretty similar to arduino ide (but with a lot of extra work needed), the peripheral libraries are the same on both ide's and are heavy, what you can try it's to disable the hardware peripherals (like i2c) and using software emulation (when be possible), I think it's called "bitbanging", on most sensors won't make a difference, using this method I was able to use an OLED display on the F030F4 (16kb), by "using" it was just printing a few text and that's about it, but using standard peripheral libraries it's just not possible.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Yes, there also a few other models on the F103 line with more flash:
But I don't think that would be cheaper than a blackpill.
Oled and F030F4 That’s crazy, I use a attiny85 with 8kb flash 512 byte ram. It receives stock prices by usb, sends them over a 433mhz RF Chip and in the same time displays the send data on an Oled 128x64 screen. I think it took 6-7kb Because I don’t think stm is too stupid to Keep it all small, this must be the difference Between 8bit and 32bit Never thought it will be so big. Loaded some books about stm, no other way. Greetings klaus
Von meinem iPhone gesendet
Am 03.06.2021 um 02:04 schrieb .rpv @.***>:
Hi
I agree, the extra usage must be related to the new core 2.0.
BTW, when I first saw this problem, the insane flash usage, first thing that I tried was to use stm32cubeide to program the f030 mcu's, but the result on flash usage was pretty similar to arduino ide (but with a lot of extra work needed), the peripheral libraries are the same on both ide's and are heavy, what you can try it's to disable the hardware peripherals (like i2c) and using software emulation (when be possible), I think it's called "bitbanging", on most sensors won't make a difference, using this method I was able to use an OLED display on the F030F4 (16kb), by "using" it was just printing a few text and that's about it, but using standard peripheral libraries it's just not possible.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi, so I'm closing this issue if you have more questions or any other issue please feel free to open a new issue. Cheers.
Hi Ok, thanks for your help. Right now I made a break with the stm I think the „issue“ was not the right place To mail. It was my issue 😉 and not really related to your github post, sure in a way, But it was more or less the only place I found about the stm32f030 Greetings klaus
Von meinem iPhone gesendet
Am 17.06.2021 um 23:54 schrieb .rpv @.***>:
Hi, so I'm closing this issue if you have more questions or any other issue please feel free to open a new issue. Cheers.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi! Would like to know how you flash these chips, I have a stm32f030c8t6 and try to flash it with Arduino and Platformio, nothing works. At least not by usb Pin A9,A10. Seems not to be supported. Would be great to get help, I am just at the end of my ideas, and to my surprise this is the only webside which is about these chips. All I find is about the stm32f103xxx. greetings Klaus