Commit 206259e4 authored by Henrique Silva's avatar Henrique Silva

Include flag on cmake script to enable EEPROM ID writing

This flag should be set to compile the firmware to run the first time on
the board, since it'll write the EEPROM with the board ID
parent acf5b6e9
......@@ -53,3 +53,8 @@ if(${TARGET_CONTROLLER} MATCHES "^LPC17")
add_definitions(-D__NEWLIB__)
add_definitions(-D__LPC17XX__)
endif()
if (WRITE_ID_EEPROM)
message(STATUS "EEPROM ID writing enabled!")
add_definitions(-DWRITE_ID_EEPROM)
set(WRITE_ID_EEPROM false CACHE BOOL "Set this flag to enable writing the board ID on the EEPROM" FORCE)
endif()
......@@ -151,8 +151,8 @@ void board_discover( void )
portENABLE_INTERRUPTS();
/* Check RTC EEPROM for board info */
//#define WRITE_EEPROM
#ifdef WRITE_EEPROM
#ifdef WRITE_ID_EEPROM
uint8_t unlock[2] = { 0x09, 0x00 };
/* Carrier type (1-byte):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment