Skip to content

New partitions #192

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

Merged
merged 6 commits into from
Feb 10, 2017
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: 1 addition & 1 deletion cores/esp32/esp32-hal-misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ void arduino_phy_init()
if(initialized){
return;
}
nvs_flash_init();
esp_phy_calibration_mode_t calibration_mode = PHY_RF_CAL_PARTIAL;
if (rtc_get_reset_reason(0) == DEEPSLEEP_RESET) {
calibration_mode = PHY_RF_CAL_NONE;
Expand Down Expand Up @@ -106,6 +105,7 @@ void initWiFi() __attribute__((weak));
void initWiFi() {}

void initArduino(){
nvs_flash_init();
init();
initVariant();
initWiFi();
Expand Down
4 changes: 2 additions & 2 deletions libraries/WiFi/src/WiFiAP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ const char * WiFiAPClass::softAPgetHostname()
*/
bool WiFiAPClass::softAPsetHostname(const char * hostname)
{
return tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_AP, hostname) == 0;
return tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_AP, hostname) == ESP_OK;
}

/**
Expand All @@ -262,7 +262,7 @@ bool WiFiAPClass::softAPsetHostname(const char * hostname)
*/
bool WiFiAPClass::softAPenableIpV6()
{
return tcpip_adapter_create_ip6_linklocal(TCPIP_ADAPTER_IF_AP) == 0;
return tcpip_adapter_create_ip6_linklocal(TCPIP_ADAPTER_IF_AP) == ESP_OK;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ recipe.size.regex.data=^(?:\.dram0\.data|\.dram0\.bss)\s+([0-9]+).*
tools.esptool.upload.protocol=esp32
tools.esptool.upload.params.verbose=
tools.esptool.upload.params.quiet=
tools.esptool.upload.pattern={cmd} --chip esp32 --port "{serial.port}" --baud {upload.speed} --before default_reset --after hard_reset write_flash -z --flash_freq {build.flash_freq} --flash_mode {build.flash_mode} --flash_size {build.flash_size} 0x1000 "{runtime.platform.path}/tools/sdk/bin/bootloader.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin" 0x10000 "{build.path}/{build.project_name}.bin"
tools.esptool.upload.pattern={cmd} --chip esp32 --port "{serial.port}" --baud {upload.speed} --before default_reset --after hard_reset write_flash -z --flash_freq {build.flash_freq} --flash_mode {build.flash_mode} --flash_size {build.flash_size} 0x1000 "{runtime.platform.path}/tools/sdk/bin/bootloader.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin" 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin" 0x10000 "{build.path}/{build.project_name}.bin"
Binary file added tools/partitions/boot_app0.bin
Binary file not shown.
Binary file added tools/partitions/default.bin
Binary file not shown.
10 changes: 6 additions & 4 deletions tools/partitions/default.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1M,
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000
otadata, data, ota, 0xe000, 0x2000
app0, app, ota_0, 0x10000, 1M,
app1, app, ota_1, , 1M,
spiffs, data, spiffs, , 0x1F0000,
7 changes: 3 additions & 4 deletions tools/platformio-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,9 @@
],

UPLOADERFLAGS=[
"0x1000", '"%s"' % join(FRAMEWORK_DIR, "tools",
"sdk", "bin", "bootloader.bin"),
"0x8000", '"%s"' % join(FRAMEWORK_DIR, "tools",
"sdk", "bin", "partitions_singleapp.bin"),
"0x1000", '"%s"' % join(FRAMEWORK_DIR, "tools", "sdk", "bin", "bootloader.bin"),
"0x8000", '"%s"' % join(FRAMEWORK_DIR, "tools", "partitions", "default.bin"),
"0xe000", '"%s"' % join(FRAMEWORK_DIR, "tools", "partitions", "boot_app0.bin"),
"0x10000"
]
)
Expand Down