## Compiling for a personalized card STM32F407VGT6

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Krasn4ck
Posts: 6
Joined: Wed Feb 10, 2021 5:46 pm
Location: Baikonur

### Compiling for a personalized card STM32F407VGT6

Hello.
I am trying to compile MicroPython version 1.14 on a custom board with STM32F407VGT6, I have all the compile files needed to compile are as follows:
• mpconfigboard.h
• mpconfigboard.mk
• pins.csv
• stm32f4xx_hal_conf.h
I put the folder of these files in the path /ports/stm32/boards/ but I get the following error when I try to compile:

Code: Select all

``````Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
make: *** No rule to make target 'build-OPHYRA/genhdr/pins.h', needed by 'build-OPHYRA/py/mpstate.o'.  Stop.
``````
This is the command I am using to perform the compilation:

Code: Select all

``make -j2 BOARD=OPHYRA``
I am using Cygwin to perform the compilation process
Thank you very much if you can give me any guidance as to what the problem is with this error.

Update, now have this issue:

Code: Select all

`````` make BOARD=OPHYRA
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
|                             ^~~~~~~~~~~~~~~~~~~~~~~~~
adc.h:50:29: note: each undeclared identifier is reported only once for each function it appears in
make: *** [../../py/mkrules.mk:77: build-OPHYRA/machine_adc.o] Error 1
``````

jimmo
Posts: 2244
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

### Re: Compiling for a personalized card STM32F407VGT6

Krasn4ck wrote:
Wed Feb 10, 2021 6:45 pm
Update, now have this issue:
How did you fix the first issue?

Are you able to successfully build other boards? For example the OLIMEX_F407 is a good test as it uses the same MCU.

Krasn4ck
Posts: 6
Joined: Wed Feb 10, 2021 5:46 pm
Location: Baikonur

### Re: Compiling for a personalized card STM32F407VGT6

jimmo wrote:
Thu Feb 11, 2021 5:22 am
Krasn4ck wrote:
Wed Feb 10, 2021 6:45 pm
Update, now have this issue:
How did you fix the first issue?

Are you able to successfully build other boards? For example the OLIMEX_F407 is a good test as it uses the same MCU.
Hi Jimmo with OLIMEX_F407 I had no problem, now I simply corrected this error, but now I got this one:

Code: Select all

``````CC build-OPHYRA/frozen_content.c
C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2020-q4-major\bin\arm-none-eabi-ld.exe: build-OPHYRA/main.o: in function `stm32_main':
main.c:(.text.stm32_main+0x264): undefined reference to `_sstack'
C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2020-q4-major\bin\arm-none-eabi-ld.exe: build-OPHYRA/stm32_it.o: in function `HardFault_C_Handler':
stm32_it.c:(.text.HardFault_C_Handler+0x150): undefined reference to `_sstack'
C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2020-q4-major\bin\arm-none-eabi-ld.exe: build-OPHYRA/modmachine.o: in function `machine_info':
modmachine.c:(.text.machine_info+0x1a0): undefined reference to `_sstack'
make: *** [Makefile:689: build-OPHYRA/firmware.elf] Error 1``````

jimmo
Posts: 2244
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

### Re: Compiling for a personalized card STM32F407VGT6

Krasn4ck wrote:
Thu Feb 11, 2021 5:11 pm
Hi Jimmo with OLIMEX_F407 I had no problem, now I simply corrected this error, but now I got this one:
Can you put a copy of the OPHYRA board directory somewhere (e.g. on github) ?