Page 1 of 1

makefile path

Posted: Thu Dec 31, 2015 5:54 pm
by fastlink30
i want compile a simple test project using makefile (chibios 3.04 with custom board & STM32F103C8), i not use chibistudio, not like

copyed makefile from ChibiOS_3.0.4\demos\STM32\RT-STM32F103-OLIMEX_STM32_P103\
created the board files and put on os/hal/boards/boardname

changed the makefile (see attachment)

when i compile (from shell) i get this message:
c:\EmBitz\SIMPLE_STEPPER>make
Compiling crt0_v7m.s
Compiling chcoreasm_v7m.s
Compiling crt1.c
Compiling vectors.c
Compiling chsys.c
In file included from c:/EmBitz/SIMPLE_STEPPER/ext/ChibiOS_3.0.4/os/rt/include/ch.h:73:0, from c:/EmBitz/SIMPLE_STEPPER/ext/ChibiOS_3.0.4/os/rt/src/chsys.c:36:
c:/EmBitz/SIMPLE_STEPPER/ext/ChibiOS_3.0.4/os/rt/include/chsystypes.h:50:6: warning: "CH_CFG_ST_RESOLUTION" is not defined [-Wundef]
#if (CH_CFG_ST_RESOLUTION == 32) || defined(__DOXYGEN__)
^
c:/EmBitz/SIMPLE_STEPPER/ext/ChibiOS_3.0.4/os/rt/include/chsystypes.h:52:7: warning: "CH_CFG_ST_RESOLUTION" is not defined [-Wundef]
#elif CH_CFG_ST_RESOLUTION == 16
^


sure the problem are paths, but i must put all the paths inside the INCDIR variable? there are so many, nosense do something like this, sure there are alternative, or i'm doing something wrong?

Re: makefile path

Posted: Thu Dec 31, 2015 6:58 pm
by Giovanni
Hi,

There is a single line to change in makefiles:

Code: Select all

# Imported source files and paths
CHIBIOS = ../../..


It must point to the ChibiOS root directory, where the readme.txt is located.

Giovanni

Re: makefile path

Posted: Thu Dec 31, 2015 7:07 pm
by fastlink30
on the makefile attached, i give absolute path, and is exactly the path where i found the readme.txt

anyway tryed your suggestion, but give me this:

C:\EmBitz\SIMPLE_STEPPER>make
Makefile:92: ../../../os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk: No such file or directory
Makefile:94: ../../../os/hal/hal.mk: No such file or directory
Makefile:95: ../../../os/hal/ports/STM32/STM32F1xx/platform.mk: No such file or directory
Makefile:96: ../../../os/hal/boards/RLABS_STEPPER_F103/board.mk: No such file or directory
Makefile:97: ../../../os/hal/osal/rt/osal.mk: No such file or directoryMakefile:99: ../../../os/rt/rt.mk: No such file or directory
Makefile:100: ../../../os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk: No suchfile or directory
Makefile:222: ../../../os/common/ports/ARMCMx/compilers/GCC/rules.mk: No such file or directory
make: *** No rule to make target '../../../os/common/ports/ARMCMx/compilers/GCC/rules.mk'. Stop.


sorry, i know this question is not strictly connected with chibios, but i'm not used to makefile syntax so i'm little lost

Re: makefile path

Posted: Thu Dec 31, 2015 7:13 pm
by Giovanni
You must provide the relative path between the makefile position and the chibios root position.

I am assuming you are using a correct version of make.

Giovanni

Re: makefile path

Posted: Thu Dec 31, 2015 8:53 pm
by fastlink30
i use make of cygwin64

Re: makefile path

Posted: Thu Dec 31, 2015 10:07 pm
by Giovanni
Try the one in MinGW binary utilities, it is known to work.

Giovanni

Re: makefile path

Posted: Fri Jan 01, 2016 4:09 pm
by fastlink30
installed also mingw, but also problem persist

anyway found what make this error
i have quite old project (chibios 2.6.4) and want update to 3.0, so i copied all the .c .h of the project and the 3 configuration file (mcuconf,halconf,chconf) on the new directory of the project.
wrong! these 3 files must be for the 3.0 release, made this the compilation problem gone.... :roll:

anyway thanks :)