mcauser / BLACK_F407VE

MicroPython board definition for the MCUDev Black STM32F407VET6 board
MIT License
122 stars 47 forks source link

./mpconfigboard_common.h:175:0: error: "MICROPY_HW_ENABLE_CAN" redefined [-Werror] #4

Closed japuzzo closed 6 years ago

japuzzo commented 6 years ago

commit 12468d134053bc7dea812a492634c131f45b24da (HEAD -> master, origin/master, origin/HEAD) Merge: 14d612b 6ab7fb6 Author: Mike Causer mcauser@gmail.com Date: Tue Apr 10 09:51:00 2018 +1000

When I follow the step "make BOARD=BLACK_F407VE" I get the follow errors:

$ make BOARD=BLACK_F407VE
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
GEN build-BLACK_F407VE/genhdr/qstr.i.last
In file included from ./mpconfigport.h:32:0,
                 from ../../py/mpconfig.h:45,
                 from ../../py/mpstate.h:31,
                 from ../../py/mpstate.c:27:
./mpconfigboard_common.h:175:0: error: "MICROPY_HW_ENABLE_CAN" redefined [-Werror]
 #define MICROPY_HW_ENABLE_CAN (0)

In file included from ./mpconfigport.h:31:0,
                 from ../../py/mpconfig.h:45,
                 from ../../py/mpstate.h:31,
                 from ../../py/mpstate.c:27:
boards/BLACK_F407VE/mpconfigboard.h:12:0: note: this is the location of the previous definition
 #define MICROPY_HW_ENABLE_CAN       (1)

cc1: all warnings being treated as errors
In file included from ./mpconfigport.h:32:0,
                 from ../../py/mpconfig.h:45,
                 from ../../py/malloc.c:31:
./mpconfigboard_common.h:175:0: error: "MICROPY_HW_ENABLE_CAN" redefined [-Werror]
 #define MICROPY_HW_ENABLE_CAN (0)

In file included from ./mpconfigport.h:31:0,
                 from ../../py/mpconfig.h:45,
                 from ../../py/malloc.c:31:
boards/BLACK_F407VE/mpconfigboard.h:12:0: note: this is the location of the previous definition
 #define MICROPY_HW_ENABLE_CAN       (1)

...

cc1: all warnings being treated as errors
In file included from ./mpconfigport.h:32:0,
                 from ../../py/mpconfig.h:45,
                 from ../../py/obj.h:29,
                 from ../../extmod/modonewire.c:30:
./mpconfigboard_common.h:175:0: error: "MICROPY_HW_ENABLE_CAN" redefined [-Werror]
 #define MICROPY_HW_ENABLE_CAN (0)

In file included from ./mpconfigport.h:31:0,
                 from ../../py/mpconfig.h:45,
                 from ../../py/obj.h:29,
                 from ../../extmod/modonewire.c:30:
boards/BLACK_F407VE/mpconfigboard.h:12:0: note: this is the location of the previous definition
 #define MICROPY_HW_ENABLE_CAN       (1)

cc1: all warnings being treated as errors
make: *** [build-BLACK_F407VE/genhdr/qstr.i.last] Error 1
make: *** Deleting file `build-BLACK_F407VE/genhdr/qstr.i.last'
mcauser commented 6 years ago

There was an upstream change 20 days ago:

stm32/can: Allow CAN pins to be configured per board. https://github.com/micropython/micropython/commit/a7ebac2eaed7eb0da362568b9333339634f1da1d

Fixed the #define's here: https://github.com/mcauser/BLACK_F407VE/commit/a7e8e1cfb7db8fa9809dcdf23b764f3eb8e6bf50

japuzzo commented 6 years ago

pull update:

[~/micropython/ports/stm32/boards/BLACK_F407VE]$ git pull
remote: Counting objects: 4, done.
remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/mcauser/BLACK_F407VE
   12468d1..a7e8e1c  master     -> origin/master
Updating 12468d1..a7e8e1c
Fast-forward
 mpconfigboard.h | 7 ++++---
 pins.csv        | 2 ++
 2 files changed, 6 insertions(+), 3 deletions(-)

Check git log to verify at fixed point:

[~/micropython/ports/stm32/boards/BLACK_F407VE]$ git log
commit a7e8e1cfb7db8fa9809dcdf23b764f3eb8e6bf50 (HEAD -> master, origin/master, origin/HEAD)
Author: Mike Causer <mcauser@gmail.com>
Date:   Tue May 1 16:21:53 2018 +1000

    Fix for MICROPY_HW_ENABLE_CAN

    https://github.com/micropython/micropython/commit/a7ebac2eaed7eb0da362568b9333339634f1da1d
...

run make

~/micropython/ports/stm32]
0$ make BOARD=BLACK_F407VE
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
GEN build-BLACK_F407VE/genhdr/pins.h
GEN build-BLACK_F407VE/genhdr/mpversion.h
GEN build-BLACK_F407VE/genhdr/qstr.i.last
GEN build-BLACK_F407VE/genhdr/qstr.split
GEN build-BLACK_F407VE/genhdr/qstrdefs.collected.h
QSTR updated
GEN build-BLACK_F407VE/genhdr/qstrdefs.generated.h
mkdir -p build-BLACK_F407VE/boards
mkdir -p build-BLACK_F407VE/build-BLACK_F407VE
mkdir -p build-BLACK_F407VE/drivers/bus
mkdir -p build-BLACK_F407VE/drivers/dht
mkdir -p build-BLACK_F407VE/drivers/memory
mkdir -p build-BLACK_F407VE/extmod
mkdir -p build-BLACK_F407VE/lib/embed
mkdir -p build-BLACK_F407VE/lib/libc
mkdir -p build-BLACK_F407VE/lib/libm
mkdir -p build-BLACK_F407VE/lib/mp-readline
...
LINK build-BLACK_F407VE/firmware.elf
   text    data     bss     dec     hex filename
 315096      36   27892  343024   53bf0 build-BLACK_F407VE/firmware.elf
GEN build-BLACK_F407VE/firmware.dfu
GEN build-BLACK_F407VE/firmware.hex

Works!!! Thank you, Thank you!