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 support for SDK 3.0 for rBoot apps. #1470

Merged
merged 7 commits into from
Oct 12, 2018

Conversation

slaff
Copy link
Contributor

@slaff slaff commented Oct 8, 2018

This PR is here to allow developers test Sming with NON-OS SDK 3.0. Although most of the things work it is not complete yet.

Things to do before declaring the PR ready for merging:

  • (Optional) Non-rBoot application support is missing and is nice to have.

Wanna test?

Type the following commands

on Linux, MacOS and FreeBSD

cd $SMING_HOME
export SDK_BASE="$SMING_HOME/third-party/ESP8266_NONOS_SDK"

on Windows

cd %SMING_HOME%
set SDK_BASE="%SMING_HOME%/third-party/ESP8266_NONOS_SDK"

followed by the following commands (for all OSes)

git checkout develop
git fetch pull/1470/head:pr/sdk-3.0
git checkout pr/sdk-3.0
make dist-clean
# Go to your favourite application and compile it.
# Example: cd ../samples/HttpClient
make

Closes #1439.

@slaff slaff added this to the 3.7.0 milestone Oct 10, 2018
@slaff slaff changed the title Add support for SDK 3.0 for rBoot apps. Experimental support for SDK 3.0 for rBoot apps. Oct 10, 2018
@slaff slaff mentioned this pull request Oct 10, 2018
4 tasks
@slaff slaff removed the 0 - Backlog label Oct 10, 2018
@slaff slaff removed this from the 3.7.0 milestone Oct 10, 2018
@slaff slaff merged commit 6989cf4 into SmingHub:develop Oct 12, 2018
@slaff slaff added this to the 3.7.0 milestone Oct 12, 2018
@mikee47
Copy link
Contributor

mikee47 commented Oct 12, 2018

Getting a system_partition_table_regist: failed error.


load 0x40100000, len 1340, room 16
tail 12
chksum 0xe9
ho 0 tail 12 room 4
load 0x3ffe8000, len 660, room 12
tail 8
chksum 0xc8
csum 0xc8

rBoot v1.4.2 - [email protected]
Flash Size:   32 Mbit
Flash Mode:   DIO
Flash Speed:  80 MHz
rBoot Option: Big flash

Booting rom 0.
p 100 size 0xfdff0 ,0x2000 err
system_partition_table_regist: failed

Looking at the p 101 size 0xfdff0 ,0x2000 err seems the size is dodgy. I change the 0xfdfff0 to 0xfe000 and all is well.

diff --git a/Sming/appinit/user_main.cpp b/Sming/appinit/user_main.cpp
index 233188f8..8006c8fd 100644
--- a/Sming/appinit/user_main.cpp
+++ b/Sming/appinit/user_main.cpp
@@ -91,12 +91,16 @@ extern "C" void ICACHE_FLASH_ATTR  __attribute__((weak)) user_pre_init(void)
 		{SYSTEM_PARTITION_RF_CAL, rf_cal_addr, 0x1000},
 		{SYSTEM_PARTITION_PHY_DATA, phy_data_addr, 0x1000},
 		{SYSTEM_PARTITION_SYSTEM_PARAMETER, system_param_addr, 0x3000},
-		{SYSTEM_PARTITION_CUSTOMER_BEGIN, 0x2000, 0xfdff0}, // (1M - 0x2010)
+		{SYSTEM_PARTITION_CUSTOMER_BEGIN, 0x2000, 0xfe000}, // (1M - 0x2000)
 	};
 
-	if(!system_partition_table_regist(partitions, sizeof(partitions) / sizeof(partitions[0]), size_map)) {
-		os_printf("system_partition_table_regist: failed\n");
-		while(1);
+	if(!system_partition_table_regist(partitions, ARRAY_SIZE(partitions), size_map)) {
+		os_printf(_F("system_partition_table_regist: failed\n"));
+		os_printf(_F("size_map = %u\n"), size_map);
+		for (unsigned i = 0; i < ARRAY_SIZE(partitions); ++i) {
+			auto& part = partitions[i];
+			os_printf(_F("partition[%u]: %u, 0x%08x, 0x%08x\n"), i, part.type, part.addr, part.size);
+		}
 	}
 }
 

@slaff
Copy link
Contributor Author

slaff commented Oct 12, 2018

@mikee47 Can you send the changes as PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants