32L152C-DISCOVERY (STM32L152RCT6, ARM-Cortex-M3 32MHz)を買った。
ツールの入手
- MDK-ARM (ライセンス情報がないと、32KBまでのコード生成ができるLite版として動作)
-
[Install MDK Verstion 5]
=>[Download MDK-Core Version 5]
=> フォームをがんばって記入 - ファイル: MDK514.EXE (355,626K) Friday, February 13, 2015 MD5: b56f8a94db9f3ac92af4d63a0eceffb7
- 一番下の |STM32CubeMX | v4.7.0 | Active |
[Download]
|の Downloadをクリック
- 一番下の |STSW-LINK004| v3.6 | Active |
[Download]
|の Downloadをクリック
ツールとSTM32L152RC向けパッケージのインストール
- MDK-ARM
-
mdk514.exe
を実行。必要なとこにチェック入れたり、入力してNext>>
ですすめる。 - インストール後、Package Installerが起動する
- 右側の
Devices
と書かれた下の辺りに、Search:
があるので、STM32L152RC
とタイプ - 左側の ARM::CMSIS, Keil::MDK-Middlewareの
[Update]
を Keil::STM32L1xx_DFPの[Install]
を押す。 - インストールされるのを待つ。
[Up to date]
に切り替わる
- STM32CubeMX
- Javaが必要らしいので、その辺はインストールしておく。
-
SetupSTM32CubeMX-4.7.0.exe
を実行。[=>Next]
ですすめる。 -
STM32CubeMX
を実行 (デスクトップにショートカットがあるハズ) - メニュー
Help
=>Check for Updates
=>[Check]
=>[Close]
- メニュー
Help
=>Install New Libraries
=>Firmware Packege for Family STM32L1 - 1.1.0
にチェック入れて、[Install Now]
v1.2.0が最新だが、Generate Codeに対応していない (2015.4.16)
- STM32 ST-LINK utility
- zipを解凍して、実行。
- ST-Linkのプログラムと、USBドライバなどがインストールされる。
- Discoveryのボードと、USBで接続すると、Device Managerに
STMicroelectronics STLink dongle
が現れる。 - ST-Link側のファームウェアのアップグレードをしておく。
- プログラムから、
STM32 ST-LINK Utility
を起動 -
[ST-LINK]
=>Firmware update
で[Device Connect]
を押して、Versionを確認。[Yes]
で更新。
その2へとつづく...
メモ
STM32L152RCの特徴
Ultra-low-power ARM Cortex-M3 MCU with 256 Kbytes Flash, 32MHz CPU, LCD, USB, 3xOp-amp
32L152C-DISCOVERYの特徴
http://www.st-japan.co.jp/web/jp/catalog/tools/PF258515
ユーザが使えるLED2つ、タッチセンサー/キー, LCDがついてる。LCDは、ポート使いすぎ..
- STM32L152RBT6 (128 KB Flash memory, 16 KB RAM, 4 KB EEPROM) or STM32L152RCT6 (256 KB Flash memory, 32 KB RAM, 8 KB EEPROM) microcontroller in an LQFP64 package
- On-board ST-Link/V2 with selection mode switch to use the kit as a standalone ST-Link/V2 (with SWD connector for programming and debugging)
- Board power supply: through USB bus or from an external 3.3 or 5 V supply voltage
- External application power supply: 3 V and 5 V
- IDD current measurement
- LCD
- DIP28 package
- 24 segments, 4 commons
- Four LEDs:
- LD1 (red/green) for USB communication
- LD2 (red) for 3.3 V power on
- Two user LEDs, LD3 (green) and LD4 (blue)
- Two pushbuttons (user and reset)
- One linear touch sensor or four touchkeys
- Extension header for LQFP64 I/Os for quick connection to prototyping board and easy probing
MDK-ARM Lite Editionの制限(32KB以上のプログラムは作れない、って制限)
MDK-ARM Lite Edition
- Programs that generate more than 32 Kbytes of code and data will not compile, assemble, or link.
- The debugger supports programs that are 32 Kbytes or smaller.
- The compiler does not generate a disassembly listing of the machine code generated. The
-S
,--asm
, and--interleave
compiler command-line options are disabled. Projects will not compile withTarget -> Listing -> C Compiler Listing enabled
. - The compiler and assembler do not generate position-independent code or data. The
--apcs
/ropi
/rwpi
/pic
/pid` compiler and assembler command line options are disabled. - The assembler and linker create Symbolic Output Format objects which cannot be linked with third-party linker utilities. Fully licensed tools generate standard ELF/DWARF files which may be used with third-party utilities.
- The linker does not accept scatter-loading description files for sophisticated memory layouts. The
--scatter
command line option is disabled.