Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
slaff
@slaff
Better export SPI_SIZE=4M. And persist this somewhere in your environment variables.
Alexander V. Ribchansky
@avr39-ripe
With example app I got the same odd behavior - If I load web page on single tab on pc all right.. if I open another tab on pc it takes a while before ws connection os made and then if i open another tab ot mobile it also takes a while befor ws connection - about 5-9-10 seconds or MORE :( and then when I simply RELOAD (F5) page on pc it pauses again for anothe 5-10 seconds before new ws connection ;(
slaff
@slaff
One browser - multiple tabs will share the same TCP connection :)
Try one PC browser, another Mobile phone browser, third other PC browser. And they should arrive at the server with different client IPs. Not the same
Alexander V. Ribchansky
@avr39-ripe
ok, trying now; )
frankdownunder
@frankdownunder
@mikee47 Hi, I am thinking I will have a go at adding cmake support to Sming, what do you think? It will be very helpful wen we start on the ESP32 port properly. If you think it is a good idea, I will raise an Issue for it and we can continue to discuss it there.
Mike
@mikee47
@frankdownunder Yes, absolutely.
frankdownunder
@frankdownunder
@mikee47 Ive made some progress on cmake - I now have some stuff that compiles all the code, but doesnt link yet. In a few days Ill be ready to share some of what ive done - do we have anyone that knows cmake and can review it ?
Mike
@mikee47
@frankdownunder I don't know any CMake experts, but will have initial host build ready shortly which will be helpful to get working with CMake also. If you want to push ot to your own fork I'm happy to collaborate - I've become quite familiar with the existing make system and it's shortcomings so keen to see those get addressed!
slaff
@slaff

but will have initial host build ready shortly

@mikee47 I am following the arch-host development closely and waiting anxiously to test it :)

frankdownunder
@frankdownunder
@mikee47 Ive pushed some more changes to my fork on branch on feature/cmake, I am closer now to building Basic_Blink ( just a linker error to fix). Take a look if you want.
slaff
@slaff
@/all A fantastic new feature is coming to Sming - Host Emulator. With the merge of PR #1692 you will be able to test parts of your application directly on a Linux or Windows machine before flashing it to an ESP8266 device. Stay tuned for more and check the latest develop version later this week!
slaff
@slaff
@/all Host Emulator is merged in develop. Get the latest source code and give it a try. Here is a getting started guide: https://github.com/SmingHub/Sming/wiki/Host-Emulator + https://github.com/SmingHub/Sming/blob/develop/Sming/Arch/Host/readme.md
riban-bw
@riban-bw
Trade.md shows ENABLE_GDB as an option. I thought we had removed this.
*Readme.md
slaff
@slaff

I thought we had removed this.

No, why?

riban-bw
@riban-bw
When we added the gdb stuff to the core code did we not remove the need for a specific gdb build?
slaff
@slaff
Well, we still want to be able to debug on the device or to debug on the host system, right :)
And in order to compile the source code with the proper optimizations we still need ENABLE_GDB=1
slaff
@slaff
@/all If you haven't heard yet we have a Host Emulator that allows application code to be compiled and run natively before flashing it on a microcontroller. Here is a short interactive tutorial: https://www.katacoda.com/slaff/scenarios/sming-host-emulator. The tutorial should be easy to follow and understand even from non-core Sming developers.
frankdownunder
@frankdownunder
I am working with the Host Emulator, SMING_ARCH=Host. Obviously functions like spi_flash_get_id() and system_get_chip_id() are nowhere to be found. Do I just provide my own replacements?
slaff
@slaff
You can but Mike's "dream" is to have the possibility to run some parts of the code on a real device while running the rest on the emulator.
For example you can have the SPI part running on your ESP8266. And the native linux or windows application will communicate via RPC with the micro-controller to do the SPI commands.
Which is an exciting thing!
For the PRC - using protocol buffers(protobuf) could be a solution. We are not there yet, but everyone is invited to suggest, contribute code and ideas and make this happen :)
frankdownunder
@frankdownunder
Im a bit ot of my depth Im afraid - especially I want to get back to doing cmake.
slaff
@slaff
;)
We have multiple projects running at the same time and sure we will count on you for the CMake build system: https://github.com/SmingHub/Sming/projects/2
frankdownunder
@frankdownunder
@mikee47 I feel the need to test a define in my code to know if I am running on a host emulator, ( so I can do nothing when calling, say a function like system_get_chip_id() ). What the best way for that? Should I add something like this to the makefile?
ifeq ($(SMING_ARCH), Host)
CFLAGS += -DSMING_ARCH=1
endif
Mike
@mikee47
@frankdownunder #ifdef ARCH_HOST is what you're after. I've added some additional Esp8266 functions like the ones you mention in a separate branch so will look at a PR for those.
Mike
@mikee47
There are probably a number of these low-level functions which are likely to remain Esp8266-specific. It's a good idea to separate out any such Esp8266-specific code into separate modules. Functions like 'spi_get_flash_id()' are unlikely to be useful in the emulator so you can just implement to get code to compile.
frankdownunder
@frankdownunder
@mikee47 Thanks. But its eventually going to be one of three states yes? ESP82666, Host or ESP32
slaff
@slaff

But its eventually going to be one of three states

Not really. Sming may be ported also to other architectures that are not coming from Espressif.

frankdownunder
@frankdownunder
So maybe SMING_ARCH is 0 for ESP82666, 1 Host, 2 for ESP32, 3 for some other chip etc?
Mike
@mikee47
The test is for the architecture you need, so only one ARCH_* is #defined.
For the specific case of system_get_chip_id use #ifdef ARCH_ESP8266
Mike
@mikee47
I'm close to having the modularised makefiles available to try out. It's raised a lot of issues, one of which is the need to provide a way for applications to add their own Components. Like the framework, it can be a generic Component or architecture-specific, which will provide a clear path for migrating user code onto different platforms and for testing out new Components prior to contribution.
frankdownunder
@frankdownunder
spiffs_sming.c is included in the host build despite it is in the Arch/Esp8266 folder - is that intentional?
Mike
@mikee47
At one point it made sense because of the dependency on the ESP8266 flash routines. However, that will all change once partition support (#1676) is added. Taking another look it makes more sense to move it into the main Components directory, so thank you for bringing my attention to it!
kmihaylov
@kmihaylov

Hello. Yesterday I merged the current develop branch into my #1667 branch. I think the right thing to do was to git pull the upstream develop branch into the fix branch.

However now my PR is full with all the changes from the last time I pull-ed them. I tried to revert with git revert -m 1 parent_hash but there are several "refusing to lose untracked file" errors.

May you hint me how to make a clean revert to the latest state so I can pull the changes from upstream and make the PR ready for merge?

Mike
@mikee47
I usually end up wiping the repo and re-cloning it when things get this messy, makes sure there aren't any stray empty folders, etc. around.
slaff
@slaff
@kmihaylov Take a look at https://github.com/SmingHub/Sming/blob/develop/CONTRIBUTING.md and look for "Rebase if needed"
Rebasing will put your change on top.
kmihaylov
@kmihaylov
Thank you, I'll play with these until I get the desired result. Thank you all for your hard work and your contributions to the project!
slaff
@slaff
@/all The new module makefile system is merged with PR #1724 . Give it a try.
frankdownunder
@frankdownunder
I guess the instructions in the wiki need updating? The section "Get and Build Sming Core:"
ends off with
cd Sming
make
which gives "Please run make from your project directory!"
slaff
@slaff
@frankdownunder Feel free to update it. Or better wait until the current changes get stable.
frankdownunder
@frankdownunder
OK will do.
Mike
@mikee47
@frankdownunder Thanks for the Wiki updates. Re. #1683 I've started on the new docs. system which will apply to version 3.9+, so the Wiki should become fairly static.
teicors
@teicors
Hi all, just for my info; is there in Sming any example about Json stream originated by sming itself, not as answer from the webserver?