Skip to content

Commit 470e061

Browse files
committed
fix rebase conflict
1 parent b6521ca commit 470e061

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+137
-155
lines changed

connectivity/drivers/emac/TARGET_NXP_EMAC/TARGET_LPCTarget/lpc17_emac.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,6 @@ struct lpc_enetdata {
120120
uint32_t lpc_reserved_tx_num; /**< Number of reserved TX descriptors, zero-copy mode */
121121
};
122122

123-
#if defined(TARGET_LPC1768)
124-
/** \brief Group LPC17xx processors into one definition
125-
*/
126-
#define TARGET_LPC17XX
127-
#endif
128-
129123
#if defined(TARGET_LPC17XX)
130124
# if defined(TOOLCHAIN_GCC_ARM) || defined(TOOLCHAIN_ARM)
131125
# define ETHMEM_SECTION __attribute__((section("AHBSRAM"), aligned(32)))
@@ -385,9 +379,9 @@ int32_t LPC17_EMAC::lpc_packet_addr_notsafe(void *addr)
385379
/* Check for legal address ranges */
386380
#if defined(TARGET_LPC17XX)
387381
if ((((uint32_t) addr >= 0x2007C000) && ((uint32_t) addr < 0x20083FFF))) {
388-
#endif
389382
return 0;
390383
}
384+
#endif
391385
return 1;
392386
}
393387

connectivity/drivers/emac/TARGET_NXP_EMAC/TARGET_LPCTarget/lpc_emac_config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @version 1.0
77
* @date 20 Nov. 2011
88
* @author NXP MCU SW Application Team
9-
*
9+
*
1010
* Copyright(C) 2011, NXP Semiconductor
1111
* All rights reserved.
1212
*
@@ -61,7 +61,7 @@
6161
*/
6262
#define PHY_USE_100MBS 1 /**< Sets data rate to 100Mbps. */
6363

64-
/**
64+
/**
6565
* @}
6666
*/
6767

@@ -95,7 +95,7 @@
9595
*/
9696
#define LPC_TX_PBUF_BOUNCE_EN 1
9797

98-
/**
98+
/**
9999
* @}
100100
*/
101101

connectivity/lwipstack/lwip-sys/arch/cc.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,8 @@ void trace_to_ascii_hex_dump(char* prefix, int len, char *data);
131131

132132
/* Define the memory area for the lwip's memory pools */
133133
#ifndef MEMP_SECTION
134-
#if defined(TARGET_LPC1768)
135-
# if defined (__ICCARM__)
136-
# define MEMP_SECTION
137-
# elif defined(TOOLCHAIN_GCC_CR)
138-
# define MEMP_SECTION __attribute__((section(".data.$RamPeriph32")))
139-
# else
140-
# define MEMP_SECTION __attribute__((section("AHBSRAM"),aligned))
141-
# endif
134+
#if defined(TARGET_LPC17XX)
135+
# define MEMP_SECTION __attribute__((section("AHBSRAM"),aligned))
142136
#endif
143137
#endif
144138

connectivity/lwipstack/lwip-sys/arch/lwip_sys_arch.c

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,10 @@
3131

3232
/* Define the heap ourselves to give us section placement control */
3333
#ifndef ETHMEM_SECTION
34-
#if defined(TARGET_LPC1768)
35-
# if defined (__ICCARM__)
36-
# define ETHMEM_SECTION
37-
# elif defined(TOOLCHAIN_GCC_CR)
38-
# define ETHMEM_SECTION __attribute__((section(".data.$RamPeriph32")))
39-
# else
40-
# define ETHMEM_SECTION __attribute__((section("AHBSRAM"),aligned))
41-
# endif
34+
#if defined(TARGET_LPC17XX)
35+
# define ETHMEM_SECTION __attribute__((section("AHBSRAM"),aligned))
4236
#elif defined(TARGET_STM32H7)
43-
# if defined (__ICCARM__)
44-
# define ETHMEM_SECTION
45-
# else
46-
# define ETHMEM_SECTION __attribute__((section(".ethusbram")))
47-
# endif
37+
# define ETHMEM_SECTION __attribute__((section(".ethusbram")))
4838
#else
4939
#define ETHMEM_SECTION
5040
#endif
@@ -65,9 +55,6 @@ struct mem {
6555
#define SIZEOF_STRUCT_MEM LWIP_MEM_ALIGN_SIZE(sizeof(struct mem))
6656
#define MEM_SIZE_ALIGNED LWIP_MEM_ALIGN_SIZE(MEM_SIZE)
6757

68-
#if defined (__ICCARM__)
69-
#pragma location = ".ethusbram"
70-
#endif
7158
LWIP_DECLARE_MEMORY_ALIGNED(lwip_ram_heap, MEM_SIZE_ALIGNED + (2U*SIZEOF_STRUCT_MEM)) ETHMEM_SECTION;
7259

7360
#if NO_SYS==1
@@ -320,7 +307,7 @@ err_t sys_sem_new(sys_sem_t *sem, u8_t count) {
320307
sem->id = osSemaphoreNew(UINT16_MAX, count, &sem->attr);
321308
if (sem->id == NULL)
322309
MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_NETWORK_STACK, MBED_ERROR_CODE_FAILED_OPERATION), "sys_sem_new create error\n", (u32_t)sem);
323-
310+
324311
return ERR_OK;
325312
}
326313

@@ -349,12 +336,12 @@ err_t sys_sem_new(sys_sem_t *sem, u8_t count) {
349336
*---------------------------------------------------------------------------*/
350337
u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout) {
351338
u32_t start = osKernelGetTickCount();
352-
339+
353340
if (osSemaphoreAcquire(sem->id, (timeout != 0)?(timeout):(osWaitForever)) != osOK) {
354341
MBED_WARNING1(MBED_MAKE_ERROR(MBED_MODULE_NETWORK_STACK, MBED_ERROR_CODE_TIME_OUT), "sys_arch_sem_wait time out\n", (u32_t)sem);
355342
return SYS_ARCH_TIMEOUT;
356343
}
357-
344+
358345
return osKernelGetTickCount() - start;
359346
}
360347

@@ -394,7 +381,7 @@ err_t sys_mutex_new(sys_mutex_t *mutex) {
394381
MBED_WARNING1(MBED_MAKE_ERROR(MBED_MODULE_NETWORK_STACK, MBED_ERROR_CODE_FAILED_OPERATION), "sys_mutex_new error\n", (u32_t)mutex);
395382
return ERR_MEM;
396383
}
397-
384+
398385
return ERR_OK;
399386
}
400387

@@ -521,7 +508,7 @@ static sys_thread_data_t thread_pool[SYS_THREAD_POOL_N];
521508
*---------------------------------------------------------------------------*/
522509
#ifndef MBED_TZ_DEFAULT_ACCESS
523510
#define MBED_TZ_DEFAULT_ACCESS 0
524-
#endif
511+
#endif
525512

526513
sys_thread_t sys_thread_new(const char *pcName,
527514
void (*thread)(void *arg),
@@ -547,7 +534,7 @@ static sys_thread_data_t thread_pool[SYS_THREAD_POOL_N];
547534
t->id = osThreadNew((osThreadFunc_t)thread, arg, &t->attr);
548535
if (t->id == NULL)
549536
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_NETWORK_STACK, MBED_ERROR_CODE_THREAD_CREATE_FAILED), "sys_thread_new create error\n");
550-
537+
551538
return t;
552539
}
553540

connectivity/lwipstack/mbed_lib.json5

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@
169169
"LPC1768": {
170170
"mem-size": 16362
171171
},
172+
"LPCXPRESSO_LPC1769": {
173+
"mem-size": 16362
174+
},
172175
"ARCH_PRO": {
173176
"mem-size": 16362
174177
},

targets/TARGET_NXP/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
add_subdirectory(TARGET_LPC11XX_11CXX EXCLUDE_FROM_ALL)
5-
add_subdirectory(TARGET_LPC176X EXCLUDE_FROM_ALL)
5+
add_subdirectory(TARGET_LPC17XX EXCLUDE_FROM_ALL)
66
add_subdirectory(TARGET_MCUXpresso_MCUS EXCLUDE_FROM_ALL)
77

88
add_library(mbed-nxp INTERFACE)

targets/TARGET_NXP/TARGET_LPC176X/CMakeLists.txt renamed to targets/TARGET_NXP/TARGET_LPC17XX/CMakeLists.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ add_subdirectory(TARGET_ARCH_PRO EXCLUDE_FROM_ALL)
55
add_subdirectory(TARGET_MBED_LPC1768 EXCLUDE_FROM_ALL)
66
add_subdirectory(TARGET_LPCXPRESSO_LPC1769 EXCLUDE_FROM_ALL)
77

8-
add_library(mbed-lpc176x INTERFACE)
8+
add_library(mbed-lpc17xx INTERFACE)
99

1010
if(${MBED_TOOLCHAIN} STREQUAL "ARM")
1111
set(STARTUP_FILE device/TOOLCHAIN_ARM_STD/startup_LPC17xx.S)
@@ -15,13 +15,13 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
1515
set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/LPC1768.ld)
1616
endif()
1717

18-
target_include_directories(mbed-lpc176x
18+
target_include_directories(mbed-lpc17xx
1919
INTERFACE
2020
.
2121
device
2222
)
2323

24-
target_sources(mbed-lpc176x
24+
target_sources(mbed-lpc17xx
2525
INTERFACE
2626
analogin_api.c
2727
analogout_api.c
@@ -46,8 +46,10 @@ target_sources(mbed-lpc176x
4646
${STARTUP_FILE}
4747
)
4848

49-
target_link_libraries(mbed-lpc176x INTERFACE mbed-nxp)
49+
target_link_libraries(mbed-lpc17xx INTERFACE mbed-nxp)
5050

51-
mbed_set_linker_script(mbed-arch-pro ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
52-
mbed_set_linker_script(mbed-lpc1768 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
53-
mbed_set_linker_script(mbed-lpcxpresso-lpc1769 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
51+
mbed_set_linker_script(mbed-lpc17xx ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
52+
53+
# mbed_set_linker_script(mbed-arch-pro ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
54+
# mbed_set_linker_script(mbed-lpc1768 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
55+
# mbed_set_linker_script(mbed-lpcxpresso-lpc1769 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})

0 commit comments

Comments
 (0)