Hi everyone, is it okay to pull latest source code of RIOT now ? After doing this, I can’t run or debug my iot-lab_M3 app anymore. Then I tried to build ipc_pingpong example, it worked fine with native but not with iot-lab_M3. ipc_pingpong example in my old source code (I forked it about one month ago) worked just fine with iot-lab_M3.
One thing strange with the new code is that when I apply -Wl,-gc-sections (to remove unused sections) to LINKFLAGS (in thirdparty_boards/iot-lab_M3/Makefile.include) when building ipc_pingpong (in new source code), I got this:
text data bss dec hex filename
0 0 65536 65536 10000 /home/dangnhat/RIOT-working/newRIOT/RIOT/examples/ipc_pingpong/bin/iot-lab_M3/ipc_pingpong.elf
It doesn’t happen with my old code.
Thanks in advance.
DangNhat.
/***********************************************
* Phạm Hữu Đăng Nhật
* StudentID: 51002279
* Class: MT10KTTN
* Ho Chi Minh University of Technology
* Mobile: 0164.968.2716
***********************************************/
Hi DangNhat,
In general, our master should always work. As our CI setup is not complete yet, it is not possible to assert this though. Therefore it is possible that there is a bug in master. It is also possible that some change in master requires a change in the third party code.
You can use ‘git bisect’ to find out if there is a problem and what it is =)
Cheers, Ludwig
Hi Ludwig,
I haven’t ‘git bisect’ yet but I think I found the bug: we are missing UNDEF += $(BINDIR)cpu/startup.o in the thirdparty_boards/iot-lab_M3/Makefile.include
This is what I have found: in the final image, we don’t have ISR table and startup code at the beginning address for flash mem (0x08000000). This can be seen in .map file
.isr_vector 0x08000000 0x0
0x08000000 . = ALIGN (0x4)
*(.isr_vector)
0x08000000 . = ALIGN (0x4)
it should be
*(.isr_vector)
.isr_vector 0x08000000 0x1e4 /home/dangnhat/RIOT-working/RIOT/examples/ipc_pingpong/bin/iot-lab_M3/startup.o
0x08000000 g_pfnVectors
0x080001e4
Without ISR table, the application definitely can not run. So I took a look at command line for the linker and found that it didn’t link startup.o, which should be defined in UNDEF variable. I have also taken a look at Makefile.include (s) of some other boards in RIOT repo. They all have UNDEF += $(BINDIR)cpu/startup.o .
I will test this a little more before make a PR on github but at least, now I can run and debug my app again .
Beside, one thing I need to be confirmed: UNDEF += $(BINDIR)cpu/startup.o is intended to be placed in Makefile.include of every boards instead of in RIOT/Makefile.module (like in my old code) ? 
Cheers,
DangNhat.
/***********************************************
* Phạm Hữu Đăng Nhật
* StudentID: 51002279
* Class: MT10KTTN
* Ho Chi Minh University of Technology
* Mobile: 0164.968.2716
***********************************************/
Thomas put some effort in the support, his results are here:
https://github.com/RIOT-OS/RIOT/pull/1056
I think your problem should be fixed with this pull request.
The problem was a change in the make system which was not properly done in the thirdparty repo.
Best
Christian
Hi all,
actually the fix for subdirectories in $(BINDIR) is in this PR [1].
Though I didn't get zero sized code binaries it seems to fix our boths
problems. DangNhat, let us know if this PR solves it for you too.
Best,
Thomas
[1] https://github.com/RIOT-OS/thirdparty_boards/pull/24
Hi,
actually the fix for subdirectories in $(BINDIR) is in this PR [1].
Though I didn’t get zero sized code binaries it seems to fix our boths
problems. DangNhat, let us know if this PR solves it for you too.
A big yes, this PR will solve my problem. I got zero sized binaries because I have applied -Wl,-gc-sections to LINKFLAGS. (without ISRs in startup.o all the code will be unused) 
Thank you,
DangNhat.