-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
Updated Sming to SDK 2.1 #1264
Updated Sming to SDK 2.1 #1264
Conversation
@slaff I have many issues with building. Before I have used old stable Sming version with few my own pathces (will publish it after).
I tryed to remove openlwip folder and rebuild all. Sming compiled successfuly. Now I'm trying to build Basic_Serial example:
I have changed one line in third-party/pwm/pwm.c
After that project was builded. But failed and rebooting every time:
Another point |
@anakod Try the following:
|
Unfortunately, this didn't help, same result :( |
@slaff, I'm very sorry for distortion because of insufficiently deep testing :( Usual I'm always start any tests from Basic_Serial project, because in my opinion, it should be simplest example and should work anyway. So when it didn't work - I think what nothing work :). As result of unsuccessful test I have decided to remove and re-install everything related to ESP on my laptop from zero. Next, I have decided to test more complex HttpServer_Bootstrap example to check Sming stability. There was a few new issues:
I have tryed to google it, probably this is related issue, but still no answer: After that, I have tryed to change WiFi network "Beacon Interval" in my router configuration page from default value "100" to "5". And this issue was resolved (this isn't good, we need to know how to configure beacon value on ESP to keep router settings without any changes, I'm sure). Next, looks like we have some strange issue with filesystem initialization. On first start with clean flash (after Just in case, my current Environment configuration is: Next, I decide to test one of the most complex examples - HttpServer_ConfigNetwork. Unfortunately it didn't work as it should. I was able to conrnect ESP Access Point, but haven't ability to configure Station mode connection for existing network. Next I have tryed FtpServer example. There was same issue as in HttpServer_Bootstrap - I need to manually flash esp_init_data_default.bin to be able to restart module after filesystem formatting. Good news, what after that I was able to download\upload even big files and everything works very fine (only issue what download speed was limited to 4Kb\sec by some reason, upload speed - wasn't). |
@anakod Thanks for the testing. I modified a bit the code and the travis tests and as far as I can see only the example with enabled GDB is the one that is not compiling( the issue is reported). Our travis system uses the compiler produced from esp-open-sdk. Can you also test with the |
Sming/system/uart.cpp
Outdated
@@ -492,16 +492,16 @@ void uart_set_debug(int uart_nr) | |||
switch(s_uart_debug_nr) { | |||
case UART0: | |||
system_set_os_print(1); | |||
ets_install_putc1((void *) &uart0_write_char); | |||
ets_install_putc1((void (*)(char)) &uart0_write_char); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be simplified to something like: ets_install_putc1(uart0_write_char);
.
Sming/system/uart.cpp
Outdated
@@ -140,7 +140,7 @@ void uart_start_isr(uart_t* uart) | |||
USIC(uart->uart_nr) = 0xffff; | |||
USIE(uart->uart_nr) = (1 << UIFF) | (1 << UIFR) | (1 << UITO); | |||
// ETS_UART_INTR_ATTACH(uart_isr, (void *)uart); | |||
ETS_UART_INTR_ATTACH((void *)uart_isr, (void *)uart); | |||
ETS_UART_INTR_ATTACH((ets_isr_t)uart_isr, (void *)uart); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The casting (ets_isr_t)uart_isr
is not really needed.
Sming/system/uart.cpp
Outdated
break; | ||
case UART1: | ||
system_set_os_print(1); | ||
ets_install_putc1((void *) &uart1_write_char); | ||
ets_install_putc1((void (*)(char)) &uart1_write_char); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be simplified to something like: ets_install_putc1(uart1_write_char);
b6aacc0
to
c967121
Compare
@anakod I added this suggestion as part of the PR. For the moment the code and samples can compile just fine. With the exception of ESP-Gdbstub (reported here ). Which means that direct debugging on the device is broken until the right function definition is provided. |
Most of the code seems to compile now but there is one disturbing issue. Somehow 4K of RAM got consumed by the new SDK Comparison with #SDK 2.1 Memory / Section info:
#SDK 1.5 Memory / Section info:
Any ideas what is wrong here? |
@anakod Some progress information:
I have experienced the same issues as you. Which means that for now we cannot use the new SDK until we figure out:
Concerning the
@anakod Any thoughts on this? |
Add compatibility with ESP SDK 2.1.0 by removing extra extern declaration of SDK stuff and by including proper SDK headers where needed
In order to use it make sure to set SDK_BASE to $(SMING_HOME)/third-party/ESP8266_NONOS_SDK.
…d newer (2.1.0 + )
Add compatibility with ESP SDK 2.1.0 by removing extra extern declaration of SDK stuff and by including proper SDK headers where needed
…d newer (2.1.0 + )
40c640d
to
fd583bf
Compare
fd583bf
to
3dfb0de
Compare
with SDK Version 2.1.0(116b762) and latest sming I got:
question which SDK version should I install to work with sming? |
* commit 'f8f675415c36dd4d8da45cfc3669f50469c65d8d': Preparation for release 3.5.0. (SmingHub#1295) Added Stream::indexOf(char c) that finds a character in a stream (SmingHub#1290) Made spiffs_mount() compatible with rBoot. (SmingHub#1292) Added experimental support for SDK 2.1 (SmingHub#1264) Initial test code for improved sendPing and sendPong. (SmingHub#1270) Added experimental support for LWIP v2 (SmingHub#1289) Fixed ssl memory leaks related to SSL context not being freed (SmingHub#1288) Fixed an error breaking SSL session resumption, Http Connection reuse and Http pipelining. (SmingHub#1287) Added Adafruit_BME280 Library (SmingHub#1286) Allow immediate server deletion if there are no active connections. (SmingHub#1285) Deleting an HttpClient should result in freeing the total memory it uses. Allow shutting down of TcpServers (SmingHub#1284) TcpConnection fixes related to ssl extensions. Styling fixes for HttpClient. fix/MemoryLeak(Heap) during TCP Client connection and delete Reverted: m_printf: stacksize reduced SmingHub#1097. (SmingHub#1279) Preparation for release 3.4.0. (SmingHub#1277) Mqtt memory fix: Fix copy and paste error (SmingHub#1276) Fix Memory Leak in Mqtt (SmingHub#1273) Changed a TcpClient message to be less confusing. (SmingHub#1271)
* commit '4a0fec18235521e4369d111f111c2624fbd3203b': (50 commits) Added the Arduino Libraries. Added the latest changes to the third-party projects. Preparation for release 3.5.0. (SmingHub#1295) Added Stream::indexOf(char c) that finds a character in a stream (SmingHub#1290) Made spiffs_mount() compatible with rBoot. (SmingHub#1292) Added experimental support for SDK 2.1 (SmingHub#1264) Initial test code for improved sendPing and sendPong. (SmingHub#1270) Added experimental support for LWIP v2 (SmingHub#1289) Fixed ssl memory leaks related to SSL context not being freed (SmingHub#1288) Fixed an error breaking SSL session resumption, Http Connection reuse and Http pipelining. (SmingHub#1287) Added Adafruit_BME280 Library (SmingHub#1286) Allow immediate server deletion if there are no active connections. (SmingHub#1285) Deleting an HttpClient should result in freeing the total memory it uses. Allow shutting down of TcpServers (SmingHub#1284) TcpConnection fixes related to ssl extensions. Styling fixes for HttpClient. fix/MemoryLeak(Heap) during TCP Client connection and delete Reverted: m_printf: stacksize reduced SmingHub#1097. (SmingHub#1279) Preparation for release 3.4.0. (SmingHub#1277) Mqtt memory fix: Fix copy and paste error (SmingHub#1276) Fix Memory Leak in Mqtt (SmingHub#1273) ...
ets_delay_us
, that gives the impression that SDK 2.1+ is not really top quality.