build Chibios Under Atollic Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Tabulous
Posts: 509
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 17 times

build Chibios Under Atollic

Postby Tabulous » Fri Mar 02, 2018 12:39 pm

Just wondered if anyone had done this ?

I.e. the New Atollic for STM32 and Chibios 16.1 ?

Tabulous
Posts: 509
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 17 times

Re: build Chibios Under Atollic

Postby Tabulous » Fri Mar 02, 2018 1:18 pm

it builds but it gets linkers errors, note this project builds fine in chibistudio.

Linking build/debug/t7_app.elf
c:/program files (x86)/atollic/truestudio for stm32 9.0.0/armtools/bin/../lib/gcc/arm-atollic-eabi/6.3.1/../../../../arm-atollic-eabi/bin/ld.exe: section .test VMA [2001fffc,2001ffff] overlaps section .heap VMA [2001df1c,2001ffff]
c:/program files (x86)/atollic/truestudio for stm32 9.0.0/armtools/bin/../lib/gcc/arm-atollic-eabi/6.3.1/../../../../arm-atollic-eabi/lib/armv7e-m\libc.a(lib_a-mallocr.o): In function `_malloc_r':
mallocr.c:(.text._malloc_r+0x408): undefined reference to `malloc_getpagesize_P'
mallocr.c:(.text._malloc_r+0x410): undefined reference to `malloc_getpagesize_P'
c:/program files (x86)/atollic/truestudio for stm32 9.0.0/armtools/bin/../lib/gcc/arm-atollic-eabi/6.3.1/../../../../arm-atollic-eabi/lib/armv7e-m\libc.a(lib_a-freer.o): In function `_malloc_trim_r':
mallocr.c:(.text._malloc_trim_r+0xa8): undefined reference to `malloc_getpagesize_P'
collect2.exe: error: ld returned 1 exit status
make: *** [build/debug/t7_app.elf] Error 1

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: build Chibios Under Atollic

Postby Giovanni » Fri Mar 02, 2018 1:42 pm

It looks like a customized compiler and library.

Giovanni

Tabulous
Posts: 509
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 17 times

Re: build Chibios Under Atollic

Postby Tabulous » Fri Mar 02, 2018 4:56 pm

Yeah looks like it is. I copy over the files from Chibistudio and got it to compile ok.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: build Chibios Under Atollic

Postby Giovanni » Fri Mar 02, 2018 5:44 pm

If you can use the GCC provided by ARM then the rest of the environment should be OK, Eclipse basically.

Personally I prefer to avoid being bound by specific environments, ChibiStudio is an assembly of "standard" parts.

Giovanni

crispus
Posts: 24
Joined: Sat Aug 27, 2016 10:14 am
Has thanked: 4 times
Been thanked: 3 times

Re: build Chibios

Postby crispus » Wed Sep 05, 2018 4:57 pm

I have a similar issue while trying to compile for STM32H743ZIT6

Code: Select all

/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: section .rodata VMA [0000000008008e90,0000000008009e77] overlaps section .text VMA [00000000080002c0,0000000008008eab]

I am using command line (Debian testing) with the Makefile from ChibiOS example (nucleo board). The difference is that I have some c++ files.
I use same Makefile (with the appropriate linker/headers/etc changes) to compile it for STM32F767ZIT6 and it works.

Code: Select all

$ .vfp11_veneer   0x0000000008008eac        0x0 load address 0x0000000008008e90
.v4_bx          0x0000000008008eac        0x0 load address 0x0000000008008e90
.iplt           0x0000000008008eac        0x0 load address 0x0000000008008e90
.rodata         0x0000000008008e90      0xfe8
                0x0000000008008e90                __rodata_base__ = .
 .rodata        0x0000000008008e90        0x4 /usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/lib/thumb/v7e-m/libg.a(lib_a-impure.o)
                0x0000000008008e90                _global_impure_ptr

Code: Select all

.text           0x00000000080002c0     0x8bec load address 0x00000000080002a4
                0x00000000080002c0                __text_base = .
 .text          0x00000000080002c0       0xd8 build_STM32H743ZIT6/obj/crt0_v7m.o
                0x00000000080002c0                _crt0_entry

I used two version of compilers: 6.3.1 and 7.3.1

L.E: I checked, same flags are used in both variations, same flags on nucleo H7 board example.

Code: Select all

 -mcpu=cortex-m7 -mthumb -O0 -ggdb -fomit-frame-pointer -falign-functions=16 -Werror  -ffunction-sections -fdata-sections -fno-common -flto -nostartfiles  -Wl,-Map=build_STM32H743ZIT6/xxx.map,--cref,--no-warn-mismatch,--library-path=./os/common/startup/ARMCMx/compilers/GCC/ld,--script=./os/common/startup/ARMCMx/compilers/GCC/ld/STM32H743xI.ld,--gc-sections,--defsym=__process_stack_size__=0x400,--defsym=__main_stack_size__=0x400

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: build Chibios Under Atollic

Postby Giovanni » Wed Sep 05, 2018 6:20 pm

What compiler are you using?

Those in distro repositories are known to NOT work.

Giovanni

crispus
Posts: 24
Joined: Sat Aug 27, 2016 10:14 am
Has thanked: 4 times
Been thanked: 3 times

Re: build Chibios Under Atollic

Postby crispus » Wed Sep 05, 2018 6:45 pm

Latest version from dev.arm.com: GNU Arm Embedded Toolchain Version 7-2018-q2-update (7.3.1) and 6.3.1 from debian repo.

Since STM32H7 is M7 I didn't expected to have an compiler/linker problem...

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: build Chibios Under Atollic

Postby Giovanni » Wed Sep 05, 2018 7:17 pm

Same, I doubt that the problem is the device, there is something in the project. You may try excluding parts.

Giovanni

crispus
Posts: 24
Joined: Sat Aug 27, 2016 10:14 am
Has thanked: 4 times
Been thanked: 3 times

Re: build Chibios Under Atollic

Postby crispus » Wed Sep 05, 2018 8:04 pm

It seems that is coming from C++ stuff (commenting cpp out it will compile). I have nothing fancy/complex, just 2 classes.
On same configuration STM32F767 compiles just fine.

Code: Select all

include $(CHIBIOS)/os/various/cpp_wrappers/chcpp.mk


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 13 guests