2015年9月26日星期六

Build the u-boot for raspberry pi 2

Cross compile in ubuntu environment.

1) Download required arm compiler.
I choose the most common one for testing only (not the optimized one).
sudo apt-get install gcc-arm-linux-gnueabi

ncurses-dev is required if you want to config the option by using 'make menuconfig'.
sudo apt-get install ncurses-dev


Get the u-boot package
2) git clone git://git.denx.de/u-boot.git

build the u-boot backage
3) make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- rpi_2_defconfig
Optional) make menuconfig

4) make -j8 V=1
Option) make -j8 V=1 2>&1 | tee build.log | less
Option) make -j8 SHELL='sh -x'
V=1: Output more message during build


u-boot.bin will be generated under the u-boot root directory.

Copy the u-boot.bin to the micro SD-CARD

2015年9月11日星期五

Connect STM32F103V8 with ECLIPSE+GDB+JLINK

Use SWD debugging interface.

1) Start the JLINK GDB Server
cd "c:\Program Files (x86)\SEGGER\JLinkARM_V440"
JLinkGDBServer.exe -if swd



2) In the debug configuration:



monitor flash download = 1
monitor flash breakpoints = 1

monitor reg r13 = (0x00000000)
monitor reg pc = (0x00000004)