sohotcall

STM32duino Arduino command line interface

Sep 7th, 2018
168
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # STM32duino Arduino command line interface
  2. # arduino-cli STM32
  3. # http://stm32duino.com/viewtopic.php?f=41&p=48831
  4.  
  5. $ curl http://downloads.arduino.cc/arduino-cli/arduino-cli-0.2.0-alpha.preview-linux64.tar.bz2 64.tar.bz2 -o arduino-cli.bz2 -o arduino-cli.bz2
  6. $ tar -xvf arduino-cli.bz2
  7. $ mv arduino-cli-linux64 arduino-cli
  8. $ mkdir $HOME/Arduino
  9. $ mkdir $HOME/.arduino15
  10. $ ./arduino-cli config dump >.cli-config.yml
  11. $ nano .cli-config.yml
  12.  
  13. proxy_type: auto
  14. sketchbook_path: /home/gungsukma/Arduino
  15. arduino_data: /home/gungsukma/.arduino15
  16. board_manager:
  17. additional_urls:
  18. - http://dan.drown.org/stm32duino/package_STM32duino_index.json
  19.  
  20. $ ./arduino-cli core update-index
  21. $ ./arduino-cli core search stm
  22. $ ./arduino-cli core install stm32duino:STM32F1
  23. $ ./arduino-cli board listall
  24. $ ./arduino-cli core install arduino:avr
  25. $ nano $HOME/.arduino15/packages/stm32duino/hardware/STM32F1/2018.7.2/boards.txt
  26.  
  27. genericSTM32F103C.build.flags.optimize=-Os
  28. genericSTM32F103C.build.flags.ldspecs=
  29.  
  30. ## STM32F103C8 -------------------------
  31. genericSTM32F103C.menu.device_variant.STM32F103C8=STM32F103C8 (20k RAM. 64k Fla$
  32. genericSTM32F103C.build.cpu_flags=-DMCU_STM32F103C8
  33. genericSTM32F103C.build.ldscript=ld/jtag_c8.ld
  34. genericSTM32F103C.menu.device_variant.STM32F103C8.upload.maximum_size=65536
  35. genericSTM32F103C.menu.device_variant.STM32F103C8.upload.maximum_data_size=20480
  36.  
  37. $ ./arduino-cli sketch new test
  38. $ ./arduino-cli compile -v -b stm32duino:STM32F1:genericSTM32F103C $HOME/Arduino/test
  39. $ ./arduino-cli board list
  40. $ ./arduino-cli upload -p /dev/ttyACM0 --fqbn stm32duino:STM32F1:genericSTM32F103C $HOME/Arduino/test
  41. $ ./arduino-cli lib search ethernet
  42. $ ./arduino-cli lib install "UIPEthernet"
RAW Paste Data