ubuntu 在 R40e 上 還有 Debian 在 Sempron 2600 上

顯示具有 microcontroller 標籤的文章。 顯示所有文章
顯示具有 microcontroller 標籤的文章。 顯示所有文章

2015年3月2日 星期一

STM32F4 Discovery board, in Debian Jessie

其實是follow : http://www.wolinlabs.com/blog/linux.stm32.discovery.gcc.html

結果:

啟動 stlink/st-util 時出現 error
2015-03-02T14:22:33 WARN src/stlink-usb.c: Error -3 (Permission denied) opening ST-Link/V2 device 001:003

結果是因為 /etc/udev/rules.d/45-usb-stlink-v3.rules 要加GROUPE:
# STLink Device
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="3748", MODE="0666",GROUP="plugdev"


還有..

啟動 gdb 後..出現:
warning: File "/home/charles-chang/teatime/discovery/stm32_discovery_arm_gcc/blinky/.gdbinit" auto-loading has been declined
 by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
 add-auto-load-safe-path /home/charles-chang/teatime/discovery/stm32_discovery_arm_gcc/blinky/.gdbinit
line to your configuration file "/home/charles-chang/.gdbinit".
To completely disable this security protection add
 set auto-load safe-path /
line to your configuration file "/home/charles-chang/.gdbinit".

所以就 follow instruction, 在 home 下 create file: ~/.gdbinit
set auto-load safe-path /
就可以 auto-load.


然後是 ref: http://www.wolinlabs.com/blog/stm32f4.semihosting.html

這部份比較沒問題,就照著做,download & build openocd,
semihosting 的 example 在上面就已經download 好了 (git)
所以只要 build 就可以。

然後啟動 openocd, 再啟動 gdb,
semihosting 的 output 會顯示在 openocd 那一端。

* 有點問題的是,進 semihosting 後,用 回 stlink 好像有點問題。最後解決的方法是 nb 重開機..@_@

2012年10月26日 星期五

Dev AVR on Windows -- Atmel Studio & WINAVR

  1. 去 winavr 網站 download winavr. 安裝
  2. 去 atmel 網站 download atmel studio (現在是 6.0)。
  3. 一樣,download service pack, 安裝
打開後,選 File -- import , import studio 4 project (aps)。
選一個 studio 4 的 aps 檔,他會自己 convert 成 6 的 project 檔。

點一下tool bar 的 device - Atxmega128A3。
會開啟 這個 device 的相關 page (datasheet & tool..etc)
可以看到 tool 有兩個可以選:
  1. Native
  2. As4_gcc
Native 那個好像是 Atmel 自己附的,Nsc 那個好像就是 winavr。

可以 follow 這一頁的說明,到 Tool-Option ,.. 去看/更改。
就是:
  • 安裝 winavr,假設是在 C:\Winavr
  • 開啟 avr studio, tools - options - toolchain - flavour configuration
  • Add Flavour
  • Name : winavr
  • Toolchain Path : C:\winavr\bin
  • Make Path : C:\winavr\utils\bin
  • 之後,開啟的 project,按下 toolbar 上 device 那個icon (chip icon ATxmega128A3),就會出現一堆頁面,Advanced -- Toolchain Flavour 選 winavr

接上 JTAG MKII 後,會自己找 driver install,然後在 atmel studio 開啟就找得到了。
-- 現在用的是 PDI 介面。

然後就可以 build project, debug - run 了。

標籤

網誌存檔