Skip to content

Commit

Permalink
Updated with parallel run info
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebiroll committed Feb 17, 2018
1 parent 4973b9b commit 7908012
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RAK811 breakout board
ls# RAK811 breakout board

Code from here
https://github.com/RAKWireless/RAK811_BreakBoard
Expand Down Expand Up @@ -69,6 +69,12 @@ Read more here [running in qemu](./QEMU.md)

http://www.st.com/content/ccc/resource/technical/document/reference_manual/cc/f9/93/b2/f0/82/42/57/CD00240193.pdf/files/CD00240193.pdf/jcr:content/translations/en.CD00240193.pdf

# Building with makefile,
You can checkout the original files and use this makefile to build,
https://raw.githubusercontent.com/oguiter/RAK811_BreakBoard/master/Makefile
I did this and ran the generated elf files in qemu.
Read more amout this experiment here,
Read more here [running in parallell](./parallell_run.md)


# Startup code
Expand Down
49 changes: 49 additions & 0 deletions parallell_run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Parallell run

Here I compare the software built by platformio compared to the Makefile build which should be more similar to the Original RAK source.


clone https://github.com/RAKWireless/RAK811_BreakBoard
cd RAK811_BreakBoard
wget https://raw.githubusercontent.com/oguiter/RAK811_BreakBoard/master/Makefile
make


# Start qemu
./qemu-system-arm -S -s -serial file:uart1.log -d unimp -monitor stdio -machine rak811 -cpu cortex-m3 -pflash Debug/classA.bin


# Start debugger
arm-none-eabi-gdb Debug/classA.axf -ex ' target remote:1234'




The biggest difference is that platformio has commented out the call to __libc_init_array, There also _init is called.


bl 0x8012874 <_init>


Here is the code,





0x80123dc <__libc_init_array> push {r4, r5, r6, lr} │
│0x80123de <__libc_init_array+2> movs r5, #0
│0x80123e0 <__libc_init_array+4> ldr r6, [pc, #48] ; (0x8012414 <__libc_init_array+56>) │
│0x80123e2 <__libc_init_array+6> ldr r4, [pc, #52] ; (0x8012418 <__libc_init_array+60>) │
│0x80123e4 <__libc_init_array+8> subs r4, r4, r6 │
│0x80123e6 <__libc_init_array+10> asrs r4, r4, #2
│0x80123e8 <__libc_init_array+12> cmp r5, r4 │
│0x80123ea <__libc_init_array+14> bne.n 0x8012400 <__libc_init_array+36> │
│0x80123ec <__libc_init_array+16> bl 0x8012874 <_init> │
│0x80123f0 <__libc_init_array+20> movs r5, #0
│0x80123f2 <__libc_init_array+22> ldr r6, [pc, #40] ; (0x801241c <__libc_init_array+64>) │
│0x80123f4 <__libc_init_array+24> ldr r4, [pc, #40] ; (0x8012420 <__libc_init_array+68>) │
│0x80123f6 <__libc_init_array+26> subs r4, r4, r6 │
│0x80123f8 <__libc_init_array+28> asrs r4, r4, #2
│0x80123fa <__libc_init_array+30> cmp r5, r4

0 comments on commit 7908012

Please sign in to comment.