Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental fix for issue #29 #30

Merged
merged 3 commits into from
Aug 15, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,34 @@ SECTIONS

} > RAM


/* Code can explicitly ask for data to be
placed in these higher RAM banks where
they will be left uninitialized.
*/
.AHBSRAM0 (NOLOAD):
{
Image$$RW_IRAM2$$Base = . ;
*(AHBSRAM0)
Image$$RW_IRAM2$$ZI$$Limit = .;
} > USB_RAM

.AHBSRAM1 (NOLOAD):
{
Image$$RW_IRAM3$$Base = . ;
*(AHBSRAM1)
Image$$RW_IRAM3$$ZI$$Limit = .;
} > ETH_RAM


.bss :
{
__bss_start__ = .;
*(.bss*)
*(COMMON)
__bss_end__ = .;
} > RAM


.heap :
{
Expand Down
4 changes: 4 additions & 0 deletions libraries/net/eth/lwip-eth/arch/lpc17_emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ struct lpc_enetdata {
# define ETHMEM_SECTION ALIGNED(8)
#endif

#if defined(TARGET_LPC1768) && defined(TOOLCHAIN_GCC_ARM)
#define ETHMEM_SECTION __attribute__((section("AHBSRAM1"),aligned))
#endif

/** \brief LPC EMAC driver work data
*/
ETHMEM_SECTION struct lpc_enetdata lpc_enetdata;
Expand Down
6 changes: 3 additions & 3 deletions libraries/tests/mbed/env/test_env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ void led_blink(PinName led) {

void notify_completion(bool success) {
if (success) {
printf("{{success}}"NL);
printf("{{success}}" NL );
} else {
printf("{{failure}}"NL);
printf("{{failure}}" NL );
}

printf("{{end}}"NL);
printf("{{end}}" NL);
led_blink(success?LED1:LED4);
}
2 changes: 1 addition & 1 deletion workspace_tools/libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"source_dir": [ETH_SOURCES, LWIP_SOURCES],
"build_dir": ETH_LIBRARY,
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_SOURCES, LWIP_SOURCES],
"supported": CORTEX_ARM_SUPPORT
# "supported": CORTEX_ARM_SUPPORT
},

{
Expand Down
3 changes: 2 additions & 1 deletion workspace_tools/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
MY_ARM_CLIB = join(ARM_PATH, "lib", "microlib")

# GCC ARM
GCC_ARM_PATH = "C:/arm-none-eabi-gcc-4_7/bin"
# GCC_ARM_PATH = "C:/arm-none-eabi-gcc-4_7/bin"
GCC_ARM_PATH = ""

# GCC CodeSourcery
GCC_CS_PATH = "C:/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
Expand Down
21 changes: 8 additions & 13 deletions workspace_tools/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,79 +503,74 @@
"id": "NET_1", "description": "TCP client hello world",
"source_dir": join(TEST_DIR, "net", "helloworld", "tcpclient"),
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
"supported": CORTEX_ARM_SUPPORT,
# "supported": CORTEX_ARM_SUPPORT,
},
{
"id": "NET_2", "description": "UDP client hello world",
"source_dir": join(TEST_DIR, "net", "helloworld", "udpclient"),
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
"supported": CORTEX_ARM_SUPPORT,
# "supported": CORTEX_ARM_SUPPORT,
},
{
"id": "NET_3", "description": "TCP echo server",
"source_dir": join(TEST_DIR, "net", "echo", "tcp_server"),
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
"supported": CORTEX_ARM_SUPPORT,
# "supported": CORTEX_ARM_SUPPORT,
},
{
"id": "NET_4", "description": "TCP echo client",
"source_dir": join(TEST_DIR, "net", "echo", "tcp_client"),
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
"supported": CORTEX_ARM_SUPPORT,
# "supported": CORTEX_ARM_SUPPORT,
},
{
"id": "NET_5", "description": "UDP echo server",
"source_dir": join(TEST_DIR, "net", "echo", "udp_server"),
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
"supported": CORTEX_ARM_SUPPORT,
# "supported": CORTEX_ARM_SUPPORT,
},
{
"id": "NET_6", "description": "UDP echo client",
"source_dir": join(TEST_DIR, "net", "echo", "udp_client"),
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
"supported": CORTEX_ARM_SUPPORT,
# "supported": CORTEX_ARM_SUPPORT,
},
{
"id": "NET_7", "description": "HTTP client",
"source_dir": join(TEST_DIR, "net", "protocols", "HTTPClient_HelloWorld"),
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
"supported": CORTEX_ARM_SUPPORT,
# "supported": CORTEX_ARM_SUPPORT,
},
{
"id": "NET_8", "description": "NTP client",
"source_dir": join(TEST_DIR, "net", "protocols", "NTPClient_HelloWorld"),
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
"supported": CORTEX_ARM_SUPPORT,
# "supported": CORTEX_ARM_SUPPORT,
},
{
"id": "NET_9", "description": "Multicast Send",
"source_dir": join(TEST_DIR, "net", "helloworld", "multicast_send"),
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
"supported": CORTEX_ARM_SUPPORT,
},
{
"id": "NET_10", "description": "Multicast Receive",
"source_dir": join(TEST_DIR, "net", "helloworld", "multicast_receive"),
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
"supported": CORTEX_ARM_SUPPORT,
},
{
"id": "NET_11", "description": "Broadcast Send",
"source_dir": join(TEST_DIR, "net", "helloworld", "broadcast_send"),
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
"supported": CORTEX_ARM_SUPPORT,
},
{
"id": "NET_12", "description": "Broadcast Receive",
"source_dir": join(TEST_DIR, "net", "helloworld", "broadcast_receive"),
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
"supported": CORTEX_ARM_SUPPORT,
},
{
"id": "NET_13", "description": "TCP client echo loop",
"source_dir": join(TEST_DIR, "net", "echo", "tcp_client_loop"),
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, ETH_LIBRARY],
"supported": CORTEX_ARM_SUPPORT,
},

# Vodafone tests
Expand Down
2 changes: 1 addition & 1 deletion workspace_tools/toolchains/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(self, target, options=None, notify=None, tool_path=""):
self.asm = [join(tool_path, "arm-none-eabi-as")] + self.cpu

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Peter,

Could you please explain why you neeed to switch to C++11? What part(s) of the code need this?

Thanks,
Bogdan


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