Skip to content

Commit c0fdbed

Browse files
committed
Compile network and RTOS with GCC_ARM
1 parent 0843613 commit c0fdbed

File tree

7 files changed

+58
-19
lines changed

7 files changed

+58
-19
lines changed

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,49 @@ SECTIONS
114114

115115
} > RAM
116116

117+
118+
/* Code can explicitly ask for data to be
119+
placed in these higher RAM banks where
120+
they will be left uninitialized.
121+
*/
122+
.AHBSRAM0 (NOLOAD):
123+
{
124+
Image$$RW_IRAM2$$Base = . ;
125+
*(AHBSRAM0)
126+
Image$$RW_IRAM2$$ZI$$Limit = .;
127+
} > USB_RAM
128+
129+
.AHBSRAM1 (NOLOAD):
130+
{
131+
Image$$RW_IRAM3$$Base = . ;
132+
*(AHBSRAM1)
133+
Image$$RW_IRAM3$$ZI$$Limit = .;
134+
} > ETH_RAM
135+
136+
/* .data_RAM2 : ALIGN(4)
137+
{
138+
FILL(0xff)
139+
*(.data.$RAM2*)
140+
*(.data.$ETH_RAM*)
141+
. = ALIGN(4) ;
142+
} > ETH_RAM AT>FLASH
143+
144+
.bss_RAM2 : ALIGN(4)
145+
{
146+
*(.bss.$RAM2*)
147+
*(.bss.$ETH_RAM*)
148+
. = ALIGN(4) ;
149+
} > ETH_RAM
150+
*/
151+
117152
.bss :
118153
{
119154
__bss_start__ = .;
120155
*(.bss*)
121156
*(COMMON)
122157
__bss_end__ = .;
123158
} > RAM
159+
124160

125161
.heap :
126162
{

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ struct lpc_enetdata {
142142
# define ETHMEM_SECTION ALIGNED(8)
143143
#endif
144144

145+
#define ETHMEM_SECTION __attribute__((section("AHBSRAM1"),aligned))
146+
145147
/** \brief LPC EMAC driver work data
146148
*/
147149
ETHMEM_SECTION struct lpc_enetdata lpc_enetdata;

libraries/tests/mbed/env/test_env.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ void led_blink(PinName led) {
1313

1414
void notify_completion(bool success) {
1515
if (success) {
16-
printf("{{success}}"NL);
16+
printf("{{success}}" NL );
1717
} else {
18-
printf("{{failure}}"NL);
18+
printf("{{failure}}" NL );
1919
}
2020

21-
printf("{{end}}"NL);
21+
printf("{{end}}" NL);
2222
led_blink(success?LED1:LED4);
2323
}

workspace_tools/libraries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"source_dir": [ETH_SOURCES, LWIP_SOURCES],
7272
"build_dir": ETH_LIBRARY,
7373
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_SOURCES, LWIP_SOURCES],
74-
"supported": CORTEX_ARM_SUPPORT
74+
# "supported": CORTEX_ARM_SUPPORT
7575
},
7676

7777
{

workspace_tools/settings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@
7676
MY_ARM_CLIB = join(ARM_PATH, "lib", "microlib")
7777

7878
# GCC ARM
79-
GCC_ARM_PATH = "C:/arm-none-eabi-gcc-4_7/bin"
79+
# GCC_ARM_PATH = "C:/arm-none-eabi-gcc-4_7/bin"
80+
GCC_ARM_PATH = ""
8081

8182
# GCC CodeSourcery
8283
GCC_CS_PATH = "C:/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"

workspace_tools/tests.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -503,79 +503,79 @@
503503
"id": "NET_1", "description": "TCP client hello world",
504504
"source_dir": join(TEST_DIR, "net", "helloworld", "tcpclient"),
505505
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
506-
"supported": CORTEX_ARM_SUPPORT,
506+
# "supported": CORTEX_ARM_SUPPORT,
507507
},
508508
{
509509
"id": "NET_2", "description": "UDP client hello world",
510510
"source_dir": join(TEST_DIR, "net", "helloworld", "udpclient"),
511511
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
512-
"supported": CORTEX_ARM_SUPPORT,
512+
# "supported": CORTEX_ARM_SUPPORT,
513513
},
514514
{
515515
"id": "NET_3", "description": "TCP echo server",
516516
"source_dir": join(TEST_DIR, "net", "echo", "tcp_server"),
517517
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
518-
"supported": CORTEX_ARM_SUPPORT,
518+
# "supported": CORTEX_ARM_SUPPORT,
519519
},
520520
{
521521
"id": "NET_4", "description": "TCP echo client",
522522
"source_dir": join(TEST_DIR, "net", "echo", "tcp_client"),
523523
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
524-
"supported": CORTEX_ARM_SUPPORT,
524+
# "supported": CORTEX_ARM_SUPPORT,
525525
},
526526
{
527527
"id": "NET_5", "description": "UDP echo server",
528528
"source_dir": join(TEST_DIR, "net", "echo", "udp_server"),
529529
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
530-
"supported": CORTEX_ARM_SUPPORT,
530+
# "supported": CORTEX_ARM_SUPPORT,
531531
},
532532
{
533533
"id": "NET_6", "description": "UDP echo client",
534534
"source_dir": join(TEST_DIR, "net", "echo", "udp_client"),
535535
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
536-
"supported": CORTEX_ARM_SUPPORT,
536+
# "supported": CORTEX_ARM_SUPPORT,
537537
},
538538
{
539539
"id": "NET_7", "description": "HTTP client",
540540
"source_dir": join(TEST_DIR, "net", "protocols", "HTTPClient_HelloWorld"),
541541
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
542-
"supported": CORTEX_ARM_SUPPORT,
542+
# "supported": CORTEX_ARM_SUPPORT,
543543
},
544544
{
545545
"id": "NET_8", "description": "NTP client",
546546
"source_dir": join(TEST_DIR, "net", "protocols", "NTPClient_HelloWorld"),
547547
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
548-
"supported": CORTEX_ARM_SUPPORT,
548+
# "supported": CORTEX_ARM_SUPPORT,
549549
},
550550
{
551551
"id": "NET_9", "description": "Multicast Send",
552552
"source_dir": join(TEST_DIR, "net", "helloworld", "multicast_send"),
553553
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
554-
"supported": CORTEX_ARM_SUPPORT,
554+
# "supported": CORTEX_ARM_SUPPORT,
555555
},
556556
{
557557
"id": "NET_10", "description": "Multicast Receive",
558558
"source_dir": join(TEST_DIR, "net", "helloworld", "multicast_receive"),
559559
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
560-
"supported": CORTEX_ARM_SUPPORT,
560+
# "supported": CORTEX_ARM_SUPPORT,
561561
},
562562
{
563563
"id": "NET_11", "description": "Broadcast Send",
564564
"source_dir": join(TEST_DIR, "net", "helloworld", "broadcast_send"),
565565
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
566-
"supported": CORTEX_ARM_SUPPORT,
566+
# "supported": CORTEX_ARM_SUPPORT,
567567
},
568568
{
569569
"id": "NET_12", "description": "Broadcast Receive",
570570
"source_dir": join(TEST_DIR, "net", "helloworld", "broadcast_receive"),
571571
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
572-
"supported": CORTEX_ARM_SUPPORT,
572+
# "supported": CORTEX_ARM_SUPPORT,
573573
},
574574
{
575575
"id": "NET_13", "description": "TCP client echo loop",
576576
"source_dir": join(TEST_DIR, "net", "echo", "tcp_client_loop"),
577577
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
578-
"supported": CORTEX_ARM_SUPPORT,
578+
# "supported": CORTEX_ARM_SUPPORT,
579579
},
580580

581581
# Vodafone tests

workspace_tools/toolchains/gcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __init__(self, target, options=None, notify=None, tool_path=""):
6262
self.asm = [join(tool_path, "arm-none-eabi-as")] + self.cpu
6363

6464
self.cc = [join(tool_path, "arm-none-eabi-gcc"), "-std=gnu99"] + common_flags
65-
self.cppc =[join(tool_path, "arm-none-eabi-g++"), "-std=gnu++98"] + common_flags
65+
self.cppc =[join(tool_path, "arm-none-eabi-g++"), "-std=gnu++11"] + common_flags
6666

6767
self.ld = [join(tool_path, "arm-none-eabi-gcc"), "-Wl,--gc-sections", "-Wl,--wrap,main"] + self.cpu
6868
self.sys_libs = ["stdc++", "supc++", "m", "c", "gcc"]

0 commit comments

Comments
 (0)