stm32duino flash from lazarus lazarus / 79-Embedded - ARM ---------------------------------------------------------------------- diego bertotti · 2020-04-02 20:35 first you must have stm32f1X installed on arduino ide and working. path must be adapted to your computer!!! tools->Configure external tools->ADD title: Flash STM32F103C8 st-link swd program file name: C:\Users\user\AppData\Local\Arduino15\packages\stm3 2duino\tools\stm32tools\2020.3.13\win\stlink\ST-LINK_CLI.exe parameters: -c SWD -P $ProjPath()$NameOnly($ProjFile()).bin 0x8000000 -Rst -Run -NoPrompt ---------------------------------------------------------------------- Mathias · 2020-04-04 13:52 Why don't you do it as described in this tutorial? Then you can compile with F9 and upload directly. Or does your variant have an advantage over the tutorial? https://wiki.freepascal.org/ARM_Embedded_Tutorial_- _Entry_FPC_and_STM32/de ---------------------------------------------------------------------- diego bertotti · 2020-04-07 22:57 Hi Is just another way. i'm trying flashing in differents ways. this one using swd, but im trying hid_bootloader using usb, then we will have another chance. Not always i want to flash memory after every change in code. ¿why? because i use a simulator software. Then i test it and after that, i will decide if i flash mem or still need changes in code. I use simulide for avr microcontroller. A great project! check it! thanks ---------------------------------------------------------------------- Mathias · 2020-04-09 13:52 QuoteI use simulide for avr microcontroller. A great project! check it! Do you have a link ---------------------------------------------------------------------- avra · 2020-04-09 15:59 Quote from: Mathias on April 09, 2020, 03:52:19 pmQuoteI use simulide for avr microcontroller. A great project! check it! Do you have a link https://simulide.blogspot.com/p/blog-page_4.html ---------------------------------------------------------------------- diego bertotti · 2020-04-09 18:40 this is it. thanks avra! im used with .hex code generated form lazarus and works. Still can't use debugger try it. it have a few bug, but handy ---------------------------------------------------------------------- Mathias · 2020-04-10 15:23 I could do it with Code: [Select]apt-get install simavrto install. But how do I start it? Code: [Select]$ simavr -m atmega328 Project1.binSomething starts in the console, but how does the GUI come about? Do you have an example of an ATMega328p?8p? ---------------------------------------------------------------------- diego bertotti · 2020-04-10 18:39 Quote from: Mathias on April 10, 2020, 05:23:01 pmI could do it with Code: [Select]apt-get install simavrto install. But how do I start it? Code: [Select]$ simavr -m atmega328 Project1.binSomething starts in the console, but how does the GUI come about? Do you have an example of an ATMega328p?8p? https://www.patreon.com/file?h=35657927&i=5375144 compile blink example and load .hex file to a previously dragged arduino nano board from the bottom left repository (micro->avr->arduino) and press run at top (red button). Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program blink;const  sl = 150000;  // Delay procedure mysleep(t: int32);  // A simple delayvar  i: Int32;begin  for i := 0 to t do    asm      nop  end;end; begin  // Configure pin 5 Port b as output  DDRB := DDRB or (1 shl 5);   repeat    // change LED    PORTB := PORTB or (1 shl 5);     // Pin 5 on (high)    mysleep(sl);                         // Delay     // change LED    PORTB := PORTB and not (1 shl 5);       // Pin 5 off    mysleep(sl);                         // Delay  until 1 = 2;end.end.   and load blink.hex you will see a blink led inside arduino board. then you can draw an external board hardware like led buttons gates pot analog sources etc etc and simulate it ---------------------------------------------------------------------- diego bertotti · 2020-04-11 12:18 Mathias, just take a look in the attachment. An example of a real project working right now! ---------------------------------------------------------------------- Mathias · 2020-04-11 13:40 Code: [Select]sudo apt-get install libqt5multimedia sudo apt-get install libqt5multimedia5 sudo apt-get install libqt5xml5 sudo apt-get install libqt5script5 sudo apt-get install libqt5serialport5 I got it going after a couple of apt-get. It is also unstable, there were memory access errors. But the version is still beta. ---------------------------------------------------------------------- diego bertotti · 2020-04-11 14:10 Quote from: diego bertotti on April 09, 2020, 08:40:45 pmthis is it. thanks avra! im used with .hex code generated form lazarus and works. Still can't use debugger try it. it have a few bug, but handy i warn you, but is growing and getting better ---------------------------------------------------------------------- diego bertotti · 2020-05-22 11:39 hi i found this.. great! try it! https://github.com/Turro75/stm32lazarustemplate grazie mille valerio ---------------------------------------------------------------------- Mathias · 2020-05-22 11:59 Thanks for the link. Has some interesting things with her. What is still missing is a HW I²C. What I am amazed at has the STM32 been supported by FPC for over 5 years? ---------------------------------------------------------------------- PascalDragon · 2020-05-22 12:57 Quote from: Mathias on May 22, 2020, 01:59:21 pmWhat I am amazed at has the STM32 been supported by FPC for over 5 years? Well, the arm-embedded target had been the first embedded target. And the first STM32 variant (stm32f103re) had been added on October 4th 2009.