sobota, 25. oktober 2014

stm32...

En kup linkov in skript ki jih zmeraj kje zgubim takrat ko jih najbol rabim!

V bistvu: naloži openocd, arm-none-eabi-gdb, arm-none-eabi-gcc...
potem v enem terminalu zaženi:

#!/bin/bash
arm-none-eabi-gcc -I. -fno-common -O0 -g -mcpu=cortex-m0 -mthumb -c -o main
arm-none-eabi-ld -v -TSTM32L152xB.ld -nostartfiles -o demo.elf main
arm-none-eabi-objcopy -Obinary demo.elf demo.bin
openocd -f /usr/share/openocd/scripts/board/stm32ldiscovery.cfg


V drugem terminalu pa da naložiš kodo na procesor;
telnet localhost 4444
poll
reset halt
flash probe 0
flash write_image erase demo.bin 0x08000000
reset
exit


Ter da debuggiraš tisto kodo:
arm-none-eabi-gdb demo.elf
target remote :3333
cont
print i //kjer je i premelnjivka ki jo želiš izpisati...
print i
quit


lahko pa tudi kak ddd ali eclipse naštimaš...

Pogej še na ;
http://www.chibios.org/dokuwiki/doku.php?id=chibios:guides:stlink_eclipse
http://www.chibios.org/dokuwiki/doku.php?id=chibios:guides:eclipse1
http://www.chibios.org/dokuwiki/doku.php?id=chibios:guides:eclipse2
https://www.olimex.com/Products/ARM/ST/STM32-H152/resources/STM32-H152-(Blinking-LEDs-and-USB-mouse).zip
http://salvatoremenendez.blogspot.com/2011/08/mac-os-eclipse-openocd-stm32-arm-cortex.html
https://www.olimex.com/Products/ARM/ST/STM32-H152/resources/stm32l.cfg
http://sourcegate.wordpress.com/2012/09/18/getting-started-with-an-stm32l-discovery-with-linux-and-gcc/
http://sourcegate.wordpress.com/2012/10/01/chibios-on-the-stm32l-discovery/
http://importgeek.wordpress.com/2012/09/22/stm32f4discovery-gpio-programming-using-chibios-rtos/
http://www.emcu.it/STM32/What_should_I_use_to_develop_on_STM32/stm32f0_linux_dvlpt.pdf
http://openocd.sourceforge.net/doc/html/GDB-and-OpenOCD.html
https://pixhawk.org/dev/jtag/gdb
Pomi si še da so za JTAG ter SWD različne nastavitve.

petek, 24. oktober 2014

Utopic Unicorn ali ne?

Dilema posodobit ali ne,... res je, da me ubuntu gnome rahlo mika, saj sem se že skoraj navadil unitija ampak po pravici povedano je vse skupaj preveč nestabilno in prepočasno. Ravno zato me mika posodobitev na kaj drugega. Na opensuse naprimer nimam te dileme ker je tumbleweed vedno posodobljen posodobljeno:)