Add support for Zephyr 2.3.0 (using west)

Enable CONFIG_LEGACY_DEVICETREE_MACROS and fix removed Kconfig values
like UART_1 to support v2.2 and v2.3.
This commit is contained in:
Martin Jäger
2020-06-17 11:15:38 +02:00
parent a768f059a1
commit 3185ff32a1
10 changed files with 21 additions and 7 deletions
+8
View File
@@ -27,6 +27,14 @@ config HS_MOSFET_FAIL_SAFE_PROTECTION
short and trip the fuse by switching the low-side MOSFET continuously on. This will prevent
accidental overcharging of the battery.
#
# Temporary solution to support building with Zephyr 2.2 and 2.3
#
config LEGACY_DEVICETREE_MACROS
bool "Allow use of legacy devicetree macros (fix for Zephyr 2.2)"
default y
#
# Visible (user-configurable) Kconfig symbols
#
@@ -12,6 +12,7 @@ config LIBRE_SOLAR_TYPE_ID
if UART_CONSOLE
config UART_2
bool
default y
endif # UART_CONSOLE
@@ -12,6 +12,7 @@ config LIBRE_SOLAR_TYPE_ID
if UART_CONSOLE
config UART_1
bool
default y
endif # UART_CONSOLE
@@ -26,10 +27,12 @@ endif # I2C
if PWM
config PWM_STM32_3
bool
default y
depends on PWM
config PWM_STM32_8
bool
default y
depends on PWM
@@ -12,6 +12,7 @@ config LIBRE_SOLAR_TYPE_ID
if UART_CONSOLE
config UART_2
bool
default y
endif # UART_CONSOLE
@@ -35,7 +35,7 @@ CONFIG_I2C_1=y
CONFIG_I2C_2=y
CONFIG_CAN=y
CONFIG_CAN_1=y
#CONFIG_CAN_1=y
CONFIG_EXT_THINGSET_CAN=y
CONFIG_EEPROM=y
@@ -12,6 +12,7 @@ config LIBRE_SOLAR_TYPE_ID
if UART_CONSOLE
config UART_2
bool
default y
endif # UART_CONSOLE
+2 -2
View File
@@ -42,7 +42,7 @@
// Rank and sequence definitions for STM32G4 from adc_stm32.c Zephyr driver
#define RANK(n) LL_ADC_REG_RANK_##n
static const u32_t table_rank[] = {
static const uint32_t table_rank[] = {
RANK(1),
RANK(2),
RANK(3),
@@ -62,7 +62,7 @@ static const u32_t table_rank[] = {
};
#define SEQ_LEN(n) LL_ADC_REG_SEQ_SCAN_ENABLE_##n##RANKS
static const u32_t table_seq_len[] = {
static const uint32_t table_seq_len[] = {
LL_ADC_REG_SEQ_SCAN_DISABLE,
SEQ_LEN(2),
SEQ_LEN(3),
+1 -1
View File
@@ -140,7 +140,7 @@ void ThingSetCAN::process_asap()
#endif
}
void can_pub_isr(u32_t err_flags, void *arg)
void can_pub_isr(uint32_t err_flags, void *arg)
{
// Do nothing. Publication messages are fire and forget.
}
+1 -1
View File
@@ -133,7 +133,7 @@ void ThingSetStream::process_asap()
*/
void ThingSetStream::process_input(void* user_data)
{
u8_t c;
uint8_t c;
DataStreamStruct *data_stream_ptr = (DataStreamStruct *)user_data;
bool command_flag = *(data_stream_ptr->command_flag_ptr);
char *buf_req = data_stream_ptr->buf_req_ptr;
+2 -2
View File
@@ -6,9 +6,7 @@ CONFIG_HEAP_MEM_POOL_SIZE=1024
CONFIG_GPIO=y
CONFIG_SERIAL=y
CONFIG_UART_1=y
CONFIG_I2C=y
CONFIG_I2C_1=y
# disable log by default to save memory for STM32F0 with little RAM
CONFIG_LOG=y
@@ -36,3 +34,5 @@ CONFIG_EXT_THINGSET_SERIAL=y
CONFIG_REBOOT=y
CONFIG_WATCHDOG=y
CONFIG_LEGACY_DEVICETREE_MACROS=y