Skip to content
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
2 changes: 2 additions & 0 deletions connectivity/drivers/emac/sources/CompositeEMAC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ namespace mbed {
return;
}

#if MBED_TRACE_MAX_LEVEL >= TRACE_LEVEL_INFO
char const * speedStr;
if(speed == LinkSpeed::LINK_10MBIT) {
speedStr = "10Mbps";
Expand All @@ -94,6 +95,7 @@ namespace mbed {
}

tr_info("Link up at %s %s duplex", speedStr, duplex == Duplex::FULL ? "full" : "half");
#endif

linkState = LinkState::UP;
if(mac.enable(speed, duplex) != ErrCode::SUCCESS) {
Expand Down
8 changes: 7 additions & 1 deletion storage/blockdevice/COMPONENT_SPIF/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@
},
"ARDUINO_NICLA_SENSE_ME": {
"SPI_CS": "CS_FLASH"
}
},
"NUMAKER_PFM_M487": {
"SPI_MOSI": "PC_0",
"SPI_MISO": "PC_1",
"SPI_CLK": "PC_2",
"SPI_CS": "PC_3"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ void test_contiguous_erase_write_read()
}
}

free(write_read_buf);
delete[] write_read_buf;
}

void test_program_read_small_data_sizes()
Expand Down Expand Up @@ -867,7 +867,7 @@ void test_write_deinit_init()

for (int i = 0; i < 3; i++) {
// Generate test pattern
for (int j = 0; j < prog_size; j++) {
for (bd_size_t j = 0; j < prog_size; j++) {
prog[j] = (uint8_t)'0' + i + j;
}

Expand Down
9 changes: 9 additions & 0 deletions targets/TARGET_NUVOTON/nu_miscutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,31 @@ void nu_nop(uint32_t n)
switch (rmn) {
case 9:
__NOP();
// fall through
case 8:
__NOP();
// fall through
case 7:
__NOP();
// fall through
case 6:
__NOP();
// fall through
case 5:
__NOP();
// fall through
case 4:
__NOP();
// fall through
case 3:
__NOP();
// fall through
case 2:
__NOP();
// fall through
case 1:
__NOP();
// fall through
default:
break;
}
Expand Down
6 changes: 6 additions & 0 deletions targets/targets.json5
Original file line number Diff line number Diff line change
Expand Up @@ -8230,6 +8230,12 @@ mode is recommended for target MCUs with small amounts of flash and RAM.",
"detect_code": [
"1304"
],
"components_add": [
"SPIF" // 4MiB SPI flash.

// Note that this board also has a MicroSD slot, but it is not hooked up to the right pins for SPI
// operation, so Mbed currently cannot use it.
],
"overrides": {
"hxt-present": false,
"lxt-present": true,
Expand Down
19 changes: 13 additions & 6 deletions targets/upload_method_cfg/NUMAKER_IOT_M487.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
# To change any of these parameters from their default values, set them in your build script between where you
# include app.cmake and where you add mbed os as a subdirectory.

# Notes:
# 1. The Nuvoton fork of OpenOCD is required: https://github.com/OpenNuvoton/OpenOCD-Nuvoton/releases .
# Point CMake to it via setting the OpenOCD option:
# -DOpenOCD="C:/Program Files (x86)/OpenOCD-nuvoton/bin/openocd.exe"
# 2. Take note of the "MSG" DIP switch on the Nu-Link section of the board. If set to ON, the Nu-Link will run in
# mass storage mode and can only work with the "MBED" upload method. If set to OFF, the Nu-Link will run in
# Nu-Link mode and only works with Nuvoton OpenOCD.
# 3. On Windows you will need to install the Nu-Link Keil USB driver, which can be found near the bottom here:
# https://www.nuvoton.com/tool-and-software/ide-and-compiler/
# 4. The onboard nu-link does not have a unique USB serial number configured, so the MBED_UPLOAD_SERIAL_NUMBER
# option will not work (and it doesn't seem to work with OpenOCD 0.10.x anyway). This means, sadly, it's impossible
# to work with more than one Nuvoton board at a time on a given machine.

# General config parameters
# -------------------------------------------------------------
set(UPLOAD_METHOD_DEFAULT MBED)
Expand All @@ -11,12 +24,6 @@ set(UPLOAD_METHOD_DEFAULT MBED)
set(MBED_UPLOAD_ENABLED TRUE)
set(MBED_RESET_BAUDRATE 115200)

# Config options for PYOCD
# -------------------------------------------------------------
set(PYOCD_UPLOAD_ENABLED TRUE)
set(PYOCD_TARGET_NAME m487jidae)
set(PYOCD_CLOCK_SPEED 4000k)

# Config options for OPENOCD
# -------------------------------------------------------------
set(OPENOCD_UPLOAD_ENABLED TRUE)
Expand Down
23 changes: 17 additions & 6 deletions targets/upload_method_cfg/NUMAKER_PFM_M487.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@
# To change any of these parameters from their default values, set them in your build script between where you
# include app.cmake and where you add mbed os as a subdirectory.

# Notes:
# 1. The Nuvoton fork of OpenOCD is required: https://github.com/OpenNuvoton/OpenOCD-Nuvoton/releases .
# Point CMake to it via setting the OpenOCD option. For example:
# -DOpenOCD="C:/Program Files (x86)/OpenOCD-nuvoton/bin/openocd.exe"
# 2. Take note of the "MSG" DIP switch on the Nu-Link section of the board. If set to ON, the Nu-Link will run in
# mass storage mode and can only work with the "MBED" upload method. If set to OFF, the Nu-Link will run in
# Nu-Link mode and only works with Nuvoton OpenOCD.
# 3. On Windows you will need to install the Nu-Link Keil USB driver, which can be found near the bottom here:
# https://www.nuvoton.com/tool-and-software/ide-and-compiler/
# 4. The onboard nu-link does not have a unique USB serial number configured, so the MBED_UPLOAD_SERIAL_NUMBER
# option will not work (and it doesn't seem to work with OpenOCD 0.10.x anyway). This means, sadly, it's impossible
# to work with more than one Nuvoton board at a time on a given machine.
# 5. To upgrade the Nu-Link firmware, the official instructions didn't work for me at first -- I had to use
# the ICP Programming Tool to get to a newer version. Then I could use the method of holding down the
# DAP button to get into bootloader mod, and flash the binary from here:
# https://github.com/OpenNuvoton/Nuvoton_Tools/blob/master/Latest_NuLink_Firmware/NuLink1FW.bin

# General config parameters
# -------------------------------------------------------------
set(UPLOAD_METHOD_DEFAULT MBED)
Expand All @@ -11,12 +28,6 @@ set(UPLOAD_METHOD_DEFAULT MBED)
set(MBED_UPLOAD_ENABLED TRUE)
set(MBED_RESET_BAUDRATE 115200)

# Config options for PYOCD
# -------------------------------------------------------------
set(PYOCD_UPLOAD_ENABLED TRUE)
set(PYOCD_TARGET_NAME m487jidae)
set(PYOCD_CLOCK_SPEED 4000k)

# Config options for OPENOCD
# -------------------------------------------------------------
set(OPENOCD_UPLOAD_ENABLED TRUE)
Expand Down