Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who is Online
7 user(s) are online (7 user(s) are browsing Forum)

Members: 0
Guests: 7

more...


Browsing this Thread:   1 Anonymous Users






Re: Configuring AROS build system for thumb/thumb2 ISA
#4
Home away from home
Home away from home


See User information
What I thought was compilation error caused by GCC 5.3.0 was in fact of course caused by ARM version of genmodule.h

There doesn't seem to be an easy way of defining something similar to "arm-all" architecture for "arm-thumb" and as so "arm-all" is pulled in always.

For pulling in the correct includes one could do something like this:
#elif defined __arm__
#   if defined __thumb__
#       if defined __thumb2__
#            include <aros/arm/cpu-thumb2.h>
#       else
#            include <aros/arm/cpu-thumb.h>
#       endif
#   else
#        include <aros/arm/cpu-arm.h>
#   endif


Similar thing could be done for arm-all source files using a stub file as there doesn't seem to be an easy way of using %build_archspecific more cleverly.

#if defined __arm__
#   if defined __thumb__
#       if defined __thumb2__
#            include "newstackswap-thumb2.c"
#       else
#            include "newstackswap-thumb.c"
#       endif
#   else
#        include "newstackswap-arm.c"
#   endif
#endif


If AROS gets support for thumb interworkin this all might mix things too much.

There also seems to be a few includes to "aros/arm/asm.h", but I could not find it anywhere. Is that a remnant from the past?generated

Posted on: 2016/1/16 18:33

Edited by DizzyOfCRN on 2016/1/17 18:35:09
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Configuring AROS build system for thumb/thumb2 ISA
#3
Home away from home
Home away from home


See User information
After some twiddling with the build system it should now be able to produce some sort of Thumb/Thumb2 code out of the box.

There are some issues with the GCC 5.3.0 and Thumb instruction set still, but it can build the ST hal drivers and produce runnable code for the Discovery board.

[MMAKE] Building AROS.stm32f7_discovery-bootstrap
[MMAKE] Building AROS.stm32f7_discovery-bootstrap-img
[MMAKE] Making stm32f7_discovery-bootstrap-img in arch/arm-stm32f7_discovery/bootstrap
Makedepend arch
/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_pwr_ex.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_pwr.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_rcc_ex.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_rcc.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_dma.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_ll_fmc.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_sdram.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_gpio.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_cortex.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_ltdc.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_dma2d.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/stm32746g_discovery_sdram.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/stm32746g_discovery_lcd.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/startup_stm32f746xx.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/system_stm32f7xx.c...
Makedepend arch/arm-stm32f7_discovery/bootstrap/bootstrap.c...
Compiling  arch/arm-stm32f7_discovery/bootstrap/bootstrap.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/system_stm32f7xx.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/startup_stm32f746xx.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/stm32746g_discovery_lcd.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/stm32746g_discovery_sdram.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_dma2d.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_ltdc.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_cortex.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_gpio.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_sdram.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/stm32f7xx_ll_fmc.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_dma.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_rcc.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_rcc_ex.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_pwr.c
Compiling  arch
/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_pwr_ex.c
/home/dizzyofcrn/AROS.stm32f7_discovery_crosstools/arm-aros-ld --script=/home/dizzyofcrn/AROS_Checkout/arch/arm-stm32f7_discovery/bootstrap/ldscript.lds -Map /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7_discovery-bootstrap-img.map  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/bootstrap.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/system_stm32f7xx.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/startup_stm32f746xx.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32746g_discovery_lcd.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32746g_discovery_sdram.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_dma2d.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_ltdc.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_cortex.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_gpio.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_sdram.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_ll_fmc.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_dma.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_rcc.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_rcc_ex.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_pwr.o  /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7xx_hal_pwr_ex.o -L/home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/AROS/Development/lib -laeabi -o /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7_discovery-bootstrap-img
/home/dizzyofcrn/AROS.stm32f7_discovery_crosstools/arm-aros-objdump -d -S /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7_discovery-bootstrap-img >>/home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7_discovery-bootstrap-img.asm
/home/dizzyofcrn/AROS.stm32f7_discovery_crosstools/arm-aros-objcopy -O binary /home/dizzyofcrn/AROS.stm32f7_discovery/bin/stm32f7_discovery-arm/gen/arch/arm-stm32f7_discovery/bootstrap/stm32f7_discovery-bootstrap-img
AROS compiled in 25 seconds

Posted on: 2016/1/15 8:11
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Configuring AROS build system for thumb/thumb2 ISA
#2
Home away from home
Home away from home


See User information
I magaged to build gcc 5.3.0 as AROS cross compiler and brutely added some ".if (__thumb__) xxxx .else xxx .endif" to libaebi. Configuration script messes with other arm targets... (removed hardcoded -marm)

I converted the VisualGDB LCD example to build inside AROS build system and it actually works.

http://visualgdb.com/tutorials/arm/stm32/lcd/

Posted on: 2016/1/11 21:38
Jyrki.J.Koivisto
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Configuring AROS build system for thumb/thumb2 ISA
#1
Home away from home
Home away from home


See User information
Hi,

I bought the new stm32f7 discovery board (http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/DM00190424.pdf) and decided to use AROS build system to code for it but at the moment thumb/thumb2 instruction set can't be compiled as the ARM target adds hard coded definitions for -marm

On windows with VisualGDB, GCC 5.3.0 is invoked with just "-mcpu=cortex-m7 -mthumb -mfloat-abi=soft", should the AROS ARM compiler be just a generic one and configure script would add the needed lines for gcc? Or should there be a new switch for the ISA? (ARM, ARMTHUMB ?) Or what?

Posted on: 2016/1/11 14:23
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4462
2 nikolaos
nikolaos
4206
3 magorium
magorium
4095
4 phoenixkonsole
phoenixkonsole
3942
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2810
7 mazze
mazze
2222
8 Kalamatee
Kalamatee
2212
9 clusteruk
clusteruk
2114
Powered by XOOPS © 2001-2025 The XOOPS Project