changed board in makefile, added default make target, removed hacks in hal_mac_lld.c

This commit is contained in:
Lucas Pleß 2018-01-11 16:30:52 +01:00
parent c07f995cae
commit d18e1c5b39
2 changed files with 11 additions and 7 deletions

View File

@ -93,7 +93,7 @@ include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.m
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk
include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_E407/board.mk
include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_E407_REV_D/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
@ -225,6 +225,10 @@ ULIBS =
# End of user defines
##############################################################################
build/$(PROJECT).bin: build/$(PROJECT).elf
$(BIN) build/$(PROJECT).elf build/$(PROJECT).bin
upload-jlink: build/$(PROJECT).bin
openocd -f interface/jlink.cfg -f target/stm32f4x.cfg -c "program build/$(PROJECT).elf verify reset exit"

View File

@ -270,11 +270,11 @@ void mac_lld_init(void) {
rccEnableETH(false);
/* PHY address setup.*/
//#if defined(BOARD_PHY_ADDRESS)
#if defined(BOARD_PHY_ADDRESS)
ETHD1.phyaddr = 0 << 11;
//#else
// mii_find_phy(&ETHD1);
//#endif
#else
mii_find_phy(&ETHD1);
#endif
#if defined(BOARD_PHY_RESET)
/* PHY board-specific reset procedure.*/