Skip to content

Commit 28a3466

Browse files
committed
Fixups to network code after recent merges.
Peter's and my changes to LPC1768.ld ended up adding the same AHBSRAM0 and AHBSRAM1 section clauses to the script twice. I removed one copy. I also pulled Peter's define of the ETHMEM_SECTION macro up into the previous nested #if so that the preprocessor wouldn't spit out a redefined macro warning. I verified that building the code clean before and after these changes still results in the same .bin file but now without warnings and/or duplicate code.
1 parent ff55aa3 commit 28a3466

File tree

2 files changed

+4
-23
lines changed
  • libraries

2 files changed

+4
-23
lines changed

libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC176X/TOOLCHAIN_GCC_ARM/LPC1768.ld

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -116,25 +116,6 @@ SECTIONS
116116
} > RAM
117117

118118

119-
/* Code can explicitly ask for data to be
120-
placed in these higher RAM banks where
121-
they will be left uninitialized.
122-
*/
123-
.AHBSRAM0 (NOLOAD):
124-
{
125-
Image$$RW_IRAM2$$Base = . ;
126-
*(AHBSRAM0)
127-
Image$$RW_IRAM2$$ZI$$Limit = .;
128-
} > USB_RAM
129-
130-
.AHBSRAM1 (NOLOAD):
131-
{
132-
Image$$RW_IRAM3$$Base = . ;
133-
*(AHBSRAM1)
134-
Image$$RW_IRAM3$$ZI$$Limit = .;
135-
} > ETH_RAM
136-
137-
138119
.bss :
139120
{
140121
__bss_start__ = .;

libraries/net/eth/lwip-eth/arch/lpc17_emac.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ struct lpc_enetdata {
139139
# define ETHMEM_SECTION __attribute__((section("AHBSRAM1"),aligned))
140140
# endif
141141
#else
142-
# define ETHMEM_SECTION ALIGNED(8)
143-
#endif
144-
145142
#if defined(TARGET_LPC1768) && defined(TOOLCHAIN_GCC_ARM)
146-
#define ETHMEM_SECTION __attribute__((section("AHBSRAM1"),aligned))
143+
# define ETHMEM_SECTION __attribute__((section("AHBSRAM1"),aligned))
144+
#else
145+
# define ETHMEM_SECTION ALIGNED(8)
146+
#endif
147147
#endif
148148

149149
/** \brief LPC EMAC driver work data

0 commit comments

Comments
 (0)