Summary
category | version |
---|---|
OS | macOS Sierra |
JAVA JRE | version 9 |
GNU ARM ToolChain | v5.4 2016q2 |
GNU ARM Eclipse Plugin | v4.3.2 |
OpenOCD | v0.10.0 |
Setting Firmware Dev' Enviroments
JAVA JDK(JRE) version 9
Eclipse IDE for C/C++ Developer version Oxygen
Set Eclipse Plugin (latest version)
- Excute Eclipse
Help -> Install New Software -> Add
- Name : GNU ARM Eclipse Plug-ins
- Loc : http://gnuarmeclipse.sourceforge.net/updates
or
Excute Eclipse
- Help -> Eclipse Marketplace
- Find->gnu arm
- Install GNU ARM Eclipse
GNU ARM GCC version v5.4 2016q2
Make opt folder on your Home directory (~/{$Home}/opt)
- Move downloaded Zip file to opt folder
- Unzip
- Check version
$ ${HOME}/opt/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc --version
- Open Eclipse and click Preferences
- C/C++ -> Build -> Global Tools Paths
- Set Toolchain folder
- Click Apply
OpenOCD version 0.10.0
Make opt folder on your Home directory (~/{$Home}/opt)
- Move downloaded Zip file to opt folder
- Unzip
- Open Eclipse and click Preferences
- Run/Debug -> OpenOCD
- Click Browse.. and click {$OpenOCD's PATH}/bin folder
Click Apply
Launching Configuration
- Open Eclipse and click Preferences
- Run/Debug -> Launching
- Check Always launch the previously launched application in Launch Operation
Import Project
- Download code https://github.com/oroca/oroca_boy2
- Open Eclipse
- File -> Import -> Existing Projects into Workspace
- Select orocaboy2
Project Configuration
- right click project -> Properties
- Resource -> Check other : UTF-8 in Text file encoding
- C/C++ Build -> Behavior -> Check Enable parallel build
- C/C++ Build -> Tools Paths -> Add Toolchain folder
- C/C++ Build -> Settings -> Warnings -> Check Enable all common warnings
- C/C++ Build -> Settings -> Cross ARM GNU C++ Linker -> Miscellaneous -> Check Use newlib-nano(--specs=nano.specs)
C/C++ Build -> Settings -> Cross ARM GNU C++ Linker -> Miscellaneous -> Add Other linker flags (--specs=rdimon.specs -Wl,--start-group -lgcc -lc -lc -lm -lrdimon -Wl,--end-group)
Excute Debug orocaboy2_boot using OpenOCD
Debug Configuration
- right click project -> Debug As -> Debug Configurations..
- Select GDB OpenOCD Debugging
- add elf file(Debug/orocaboy2_boot.elf) in Main
- add Config options(-f orocaboy2_openocd.cfg -c) in Debugger
add Initialization Commands(monitor init monitor flash info 0 monitor flash probe 0 monitor flash protect 0 0 127 off monitor flash info 0) in Startup- Check Shared file and Debug, Run icon in Common
Debug
- Select orocaboy2_boot
- Click Bug icon
Run orocaboy2_app
Update loader file (Only for MAC)
- Make loader file
$ cd ~/{$orocaboy2_loader's PATH}/build/mac
$ make
- Copy and paste it to orocaboy2_app/tools/orocaboy2_loader/mac
Run
- Select orocaboy2_app
- Right click and click Build Project
- Run -> External Tools -> orocaboy2_loader_mac