These are chat archives for SmingHub/Sming

30th
Nov 2015
zhivko
@zhivko
Nov 30 2015 11:36

OK now I have it like this:

    //prepare symultaneous step mask
    // taken from Robotiko@Sming
    // uint32_t pin_mask_leftright=(1<<stepPinLeftMotor)| (1<<stepPinRightMotor);
    uint32_t pin_mask_stepper = 0;
    for (int i = 0; i < 4; i++)
    {
        if (curPos[i] != nextPos[i])
        {
            pin_mask_stepper=pin_mask_stepper | step[i];
        }
    }
    GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, pin_mask_stepper); // Set pin a and b high
    delayMicroseconds(5); //Delay to keep driver specs on high at 160Mhz without delay  it is 0,65us
    GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, pin_mask_stepper);   // Set pin a and b low
    delayMicroseconds(5); //Delay to keep driver specs on high at 160Mhz without delay  it is 0,65us

I think it should work - but I cannot test it now.

alonewolfx2
@alonewolfx2
Nov 30 2015 11:50
@open-home-automation i am trying to make same thing with you
But I need one more thing like alarm time trigger
robotiko
@robotiko
Nov 30 2015 12:09
@hreintke lastest code in develop is working ok with sdk 1.4?
and windows
or tested in sdk 1.3.0?
robotiko
@robotiko
Nov 30 2015 12:31
ok
Develop branch, and future releases of Sming, require SDK v1.4+
saw in one of the issues
so .. 1.4 is mandatory
hreintke
@hreintke
Nov 30 2015 12:44
@robotiko Yes, SDK 1.4.0 is mandatory. Develop has the patch included to support SDK 1.4.0
Unfortunately, this breaks support for SDK 1.3.0.
In order not to make things too complex, we decided not to include backward compatibility.
If testing with develop branch shows too many issues with that we might reconsider bur for now...
Dmitry Kireev
@kireevco
Nov 30 2015 12:45
@hreintke I think we should keep a stable sming that supports 1.3.0 sdk version available
maybe in a separate branch
maybe fork current master, that will only accept bug fixes
what do you think?
hreintke
@hreintke
Nov 30 2015 12:47
@kireevco : There is a stable Sming supporting SDK 1.3.0. That is the released Sming 1.4.0.
This release will be available for SDK 1.3.0 users.
Dmitry Kireev
@kireevco
Nov 30 2015 12:47
but when we will merge 1.4.0 changes, what will happen with codebase of 1.3.0?
(sdk 1.3.0)
hreintke
@hreintke
Nov 30 2015 12:50
The Sming 1.4.0 release is available as download (and probably also for cloning using git tags but that is on the edges of my knowledge)
Dmitry Kireev
@kireevco
Nov 30 2015 12:50
ok, that’s normal for all new releases, but what will happen to code of the previous release? it won’t exist, because it will be replaced by new changes from develop, right?
hreintke
@hreintke
Nov 30 2015 12:51
Not sure what you mean. The code of the previous release is still available when we merge develop into master for new release.
Dmitry Kireev
@kireevco
Nov 30 2015 12:52
how do I clone 1.3.0 release after 1.4.0 comes out?
how do I submit a patch against it?
robotiko
@robotiko
Nov 30 2015 12:54
@hreintke thanks
hreintke
@hreintke
Nov 30 2015 12:55
You download the zipfile for the Sming 1.4.0 release. and as I said : (and probably also for cloning using git tags but that is on the edges of my knowledge)
We do not accepts PR's against any master branch, not old nore current
robotiko
@robotiko
Nov 30 2015 12:55
I just updated.. develop
got nice build erro
Dmitry Kireev
@kireevco
Nov 30 2015 12:56
@hreintke ok, so 1.3.0 will be just available for downloading, that’s it.
robotiko
@robotiko
Nov 30 2015 12:56
checked readme about minimum version and just 1.30.. so found the issue
Dmitry Kireev
@kireevco
Nov 30 2015 12:56
got it.
robotiko
@robotiko
Nov 30 2015 12:56
the Readme should be updated to clearly state it
hreintke
@hreintke
Nov 30 2015 12:57
Correct terminology : Sming release 1.4.0 which is the latest to support SDK 1.3.0 is only available thru download
@robotiko agree.
robotiko
@robotiko
Nov 30 2015 12:58
;)
thanks
also another doc needed
hreintke
@hreintke
Nov 30 2015 12:58
I am out for some time, talk later.
Dmitry Kireev
@kireevco
Nov 30 2015 12:58
@hreintke yeah… well, a little bit scary not having backwards compatibility, but we can roll that dice :)
robotiko
@robotiko
Nov 30 2015 12:58
the changes log
@kireevco there is not support team
sming is not that mature
Dmitry Kireev
@kireevco
Nov 30 2015 12:59
@robotiko maybe.
@hreintke @robotiko Feels like it’s time to up the major on Sming
robotiko
@robotiko
Nov 30 2015 12:59
and the real users.. update quite often
becuase last releases are big improvements
Dmitry Kireev
@kireevco
Nov 30 2015 12:59
  1. no backwards compat 2. removes confusion with sdk version 3. tons of new features.
robotiko
@robotiko
Nov 30 2015 12:59
even espressif sdk.. is update or di
die
Dmitry Kireev
@kireevco
Nov 30 2015 13:00
hehe… @robotiko that’s china style… it’s a big company
robotiko
@robotiko
Nov 30 2015 13:00
yes I get it
however backwards comaptibility .. with the real development thoughtput
Dmitry Kireev
@kireevco
Nov 30 2015 13:00
I agree, I’m not being grumpy - I’m all for going forward
robotiko
@robotiko
Nov 30 2015 13:00
would mean.. no more updates
i get it
just justifying why I think is not that critical rigth now
Dmitry Kireev
@kireevco
Nov 30 2015 13:01
I’m for «done better than perfect"
as always.
robotiko
@robotiko
Nov 30 2015 13:01
far from there I guess
Dmitry Kireev
@kireevco
Nov 30 2015 13:01
and I’m surprised @hreintke went for no backwards-compatibility:)
robotiko
@robotiko
Nov 30 2015 13:02
tradeoff
Dmitry Kireev
@kireevco
Nov 30 2015 13:02
:)
@robotiko who will take care of moving the examples to Examples
is it happening this release?
..probably should be the next one
(sming 2.5.0)
robotiko
@robotiko
Nov 30 2015 13:04
I was not very involved lately due to lack of time
I dont think there is an owner
Dmitry Kireev
@kireevco
Nov 30 2015 13:05
so was myself. just came back from a 3 month vacation
robotiko
@robotiko
Nov 30 2015 13:05
"lucky bastard" :)
kidding
Dmitry Kireev
@kireevco
Nov 30 2015 13:05
well, laid off
robotiko
@robotiko
Nov 30 2015 13:05
3 months ?
ups
Dmitry Kireev
@kireevco
Nov 30 2015 13:05
still on sort of pay
why not
robotiko
@robotiko
Nov 30 2015 13:05
sorry to heard that
Dmitry Kireev
@kireevco
Nov 30 2015 13:06
no worries, best thing ever
robotiko
@robotiko
Nov 30 2015 13:06
yes
I get that too
tiem for new projects..
;)
Dmitry Kireev
@kireevco
Nov 30 2015 13:06
time for new projects. yes.
robotiko
@robotiko
Nov 30 2015 13:06
big changes.. big opportunities
any real difference between sdk uncompress in folder from udk install?
Dmitry Kireev
@kireevco
Nov 30 2015 13:08
which sdk?
not sure what you mena, udk has xtensa toolset, espressif sdk has just libraries
robotiko
@robotiko
Nov 30 2015 13:09
more or less unwritting update procedure ..
on an original udk installation ..
Dmitry Kireev
@kireevco
Nov 30 2015 13:10
robotiko
@robotiko
Nov 30 2015 13:10
get the new sdk and uncomrpess directly in the sdk folder
Dmitry Kireev
@kireevco
Nov 30 2015 13:10
an effort to build a better and cleaner crossplatform sdk set
robotiko
@robotiko
Nov 30 2015 13:10
just reat that it was not workign the other day
Dmitry Kireev
@kireevco
Nov 30 2015 13:10
yeah. working on this thing for 4 days straight
robotiko
@robotiko
Nov 30 2015 13:10
difference with udk?
multiplatform?
Dmitry Kireev
@kireevco
Nov 30 2015 13:11
  1. multiplatform (no assumptions that you are on windows only)
  2. no junk that people don’t need
  3. open for everyone to build
  4. regular automated binary releases
  5. doesn’t need crosstool-ng to build it (so no cygwin required)
  6. not cocky
robotiko
@robotiko
Nov 30 2015 13:12
soudn good
but I'm short of experimentation time rigth now
wow..
did you noticed this new repo ?
Dmitry Kireev
@kireevco
Nov 30 2015 13:15
interesting, haven’t seen it
haha. suck windows people...
robotiko
@robotiko
Nov 30 2015 13:15
worth to have a look to see how things change
api level
however... there is just RTOS.. not iot..
Dmitry Kireev
@kireevco
Nov 30 2015 13:15
I’m admired how poeple from both camps (windows/linux) are ignorant about each other
robotiko
@robotiko
Nov 30 2015 13:15
that is a signal
Dmitry Kireev
@kireevco
Nov 30 2015 13:16
do you think iot suppor will be dropped?
robotiko
@robotiko
Nov 30 2015 13:16
not for 8266
Dmitry Kireev
@kireevco
Nov 30 2015 13:16
acutally, we already have a cross-compiler, so this repo will work for windows
robotiko
@robotiko
Nov 30 2015 13:16
whetever. the old chip..
but probably for new chip
just rtos .. to forget about all the timing shit
Dmitry Kireev
@kireevco
Nov 30 2015 13:18
@robotiko I’m far from that, so whats the practical difference iot vs rtos?
robotiko
@robotiko
Nov 30 2015 13:22
confirmed
"We try to be compatible with ESP8266 as much as possible. (RTOS version of SDK)
But there are way more features in ESP32; that means that we have to expand upon the API. This is a work in progress and more and more features will be release as the SDK matures."
this means
esp32 .. will just work on rtos
rtos is realtime os
multitasking
iot is single thread
Dmitry Kireev
@kireevco
Nov 30 2015 13:23
right, so things like threading will work?
robotiko
@robotiko
Nov 30 2015 13:24
yes
task with priorities and stuff like that
Dmitry Kireev
@kireevco
Nov 30 2015 13:24
sure
robotiko
@robotiko
Nov 30 2015 13:24
real time os
Dmitry Kireev
@kireevco
Nov 30 2015 13:24
ok, everything else pretty much is the same
robotiko
@robotiko
Nov 30 2015 13:25
there is a rtos for esp
a couple of framewroks are using it
Dmitry Kireev
@kireevco
Nov 30 2015 13:25
I’m not sure why sming was not looiking at freertos support
robotiko
@robotiko
Nov 30 2015 13:25
sming suffers in all timer stuff wdt ect from the non rtos approach
Dmitry Kireev
@kireevco
Nov 30 2015 13:27
I see.
that’s it?
timers and wdt?
I’m just wondering why can’t we start making rtos version (at least basic porting)
without timers and wdt, let’s say...
seems like rtos sdk will be the future
robotiko
@robotiko
Nov 30 2015 13:29
huge effort
I think I opened an issue months ago
got closed
.. is a realy big chnage
but now that we now esp32 will be there ..
probably needs to schedule in the future
Dmitry Kireev
@kireevco
Nov 30 2015 13:31
maybe @anakod will show up and do his magic?
robotiko
@robotiko
Nov 30 2015 13:31
who knows
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: out/build/app_0.out section .irom0.text' will not fit in regionirom0_0_seg'
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: region `irom0_0_seg' overflowed by 7930 bytes
collect2.exe: error: ld returned 1 exit status
i just updated to latest dev code (i had a 10 days old)
updated the sdk
rebuild everything
and now this ..
much bigger stuff
?
Dmitry Kireev
@kireevco
Nov 30 2015 13:33
sorry, no idea
robotiko
@robotiko
Nov 30 2015 13:33
@kireevco :D
ok dk
Dmitry Kireev
@kireevco
Nov 30 2015 13:33
last buld was 4 months ago
:(
or more
is there a flag that changes the rom size?
is rboot included now by default?
robotiko
@robotiko
Nov 30 2015 13:35
nopes
hreintke
@hreintke
Nov 30 2015 13:55
@kireevco @robotiko :
No backward compatibility just for this was due to two reasons.
  • Keeping backward comp. forced to update espressif includes. We want to keep them unchanged as much as possible
  • There is still application backward comp. Update of SDK is needed but app should be OK.
@kireevco : I agree with going for a new release. I was thinking the same.
Just was waiting to see how the esptool issue was evolving. That really needs to be correct in the release to avoid trouble.
alonewolfx2
@alonewolfx2
Nov 30 2015 14:18
@robotiko every new sdk need more irom for less ram usage. Unfortunately you need to remove some stuff in your code
Btw same code firmware is 254kb on sdk1.4 and 257kb in sdk1.5
hreintke
@hreintke
Nov 30 2015 14:30

@robotiko :
The comminication from Espressif regarding RTOS is both promising and worrying.
Pro : RTOS support is providing standardized environment. That is also why I used RTOS SDK when starting with esp8266.
Con : (on leaving out support iot_sdk for esp32) For now espressif is not taking care to much on backward compatibility.

But.. if Espressif is only supporting RTOS SDK for future development, Sming should move too. Otherwise we loose momentum as soon as esp32 arrives.

hreintke
@hreintke
Nov 30 2015 14:49
@robotiko
I agree on more difficult and (yet) unwritten upgrade path for UDK/SDK upgrade, which need to be in release notes for next sming.
I have been holding SDK1.4.0 support on develop for some time but there is a (worrying ?) lack of UDK upgrades lately.
With a Espressif SDK already out for 2.5 months, we have to move forward.
@kireevco :
I've seen your https://github.com/kireevco/esp-alt-sdk. Wondering why you started this and not pursued the open-esp-sdk activities.
When we get multiple SDK's (8266,32,??) I think it still useful to separate toolchain from SDK. Toolchain is a (close to once) activity, SDK is coming regularly from Espressif. (like //arduino.esp8266.com/stable/package_esp8266com_index.json )
Dmitry Kireev
@kireevco
Nov 30 2015 14:58
@hreintke I started this because crosstool-ng is a pain on windows. I switched to a simple build of gmp, mpfr, mpc, binutils, newlib and gcc
@pfalcon might accept my change later, as soon as it works. I’m cool with that., but right now it’s too big of a change to fork esp-open-sdk, and also, crosstool-ng, IMHO is a dead-end on windows.
I spend about 3 months in totals trying to make it work. I advanced a little bit, although not enough. also @pfalcon seemed not very interesting in helping form his side
building a package is as simple as xtensa-toolchain + espressif sdk
right now I’m struggling with toolchain build. I migrated .sh script to a makefile, so it is more correct.
after this we just copy correct sdk with patches into it and zip it up.
So, when we have another sdk to support we just add those files to xtensa toolchain and publish upder correct name (or version). like esp-alt-sdk_iot_v1.4.0 or esp-alt-sdk_rtos_v1.4.0
Dmitry Kireev
@kireevco
Nov 30 2015 15:04
and yes, publishing just toolchain is also possible, although there are ones already published.
if taht’s needed, I’ll add another build target make toolchain or something, that will produce a zip file with compiler only
(compiler, binutils, etc)
actually, this target already exists in a form.
robotiko
@robotiko
Nov 30 2015 15:06
@alonewolfx2 thanks
however .. reduce code is not an option .. specially when having 8MB and just having code for +-250KB?
I modified the ld file.. and all working
:D
more room
@hreintke you know that lately I just stop by from time to time..
I reported a few stability issues
not complainig.. just reporting .. to be aware of those initial issues newcomer might find
you are doing a great job here.. how to complaint? :D
;)
Dmitry Kireev
@kireevco
Nov 30 2015 15:09
I love complaining.
robotiko
@robotiko
Nov 30 2015 15:09
:DDD
I dotn feel like complaining when not actively contributing..
Dmitry Kireev
@kireevco
Nov 30 2015 15:10
does anyone have free rack space somewhere in US? I have servers.
robotiko
@robotiko
Nov 30 2015 15:10
:D
you mean.. real metal?
Dmitry Kireev
@kireevco
Nov 30 2015 15:10
yep
David
@dmarkey
Nov 30 2015 15:10
I have a vps
robotiko
@robotiko
Nov 30 2015 15:10
NICE
Dmitry Kireev
@kireevco
Nov 30 2015 15:10
metal, old school
or maybe a house with racks
robotiko
@robotiko
Nov 30 2015 15:10
I'm quite far from US now for that
Dmitry Kireev
@kireevco
Nov 30 2015 15:10
«a house of racks"
robotiko
@robotiko
Nov 30 2015 15:10
house of racks!
WTF
... datacenter out of business?
:D
@hreintke about the rtos .. I also see as a high risk for nono
new golden biy will need all traction ...
alon24
@alon24
Nov 30 2015 15:12
@robotiko u have an 8M flash chip?
robotiko
@robotiko
Nov 30 2015 15:12
and the less old shares with the new.. the bigger distance
@alon24 yup
Dmitry Kireev
@kireevco
Nov 30 2015 15:12
@robotiko no, my old servers
no rack space :(
robotiko
@robotiko
Nov 30 2015 15:12
@kireevco just a house of racks?
you must have stock options in a electric company ..
Dmitry Kireev
@kireevco
Nov 30 2015 15:13
well, if a person has a house with a basement, and likes technology, most likely there is some sort of rack there
robotiko
@robotiko
Nov 30 2015 15:13
or smart enought to have cloud hsoting startup and get heating for free :D
Dmitry Kireev
@kireevco
Nov 30 2015 15:13
ahah
robotiko
@robotiko
Nov 30 2015 15:14
Metal is veery expensive .. high investment compared to cloud sols
@hreintke ..scary but movign to rtos.. would be future proof from sdk perspective.. but also would fight all those cpu hugs limitations
hreintke
@hreintke
Nov 30 2015 15:21
@robotiko : I am not sure about those cpu hugs. I don't know whether the "espressif RTOS" is using preemptive or cooperative multitasking. Make a huge difference in hugs :smile:
hreintke
@hreintke
Nov 30 2015 15:29
@kireevco :
If there are already other toolchains published. Why should you/we make another and not use those ?
Dmitry Kireev
@kireevco
Nov 30 2015 15:31
there is no open build steps for those, so no one can re-build easily
I’m creating them not just for Sming :)
@iggr is also interested
robotiko
@robotiko
Nov 30 2015 16:51
anyone tried the servo PR?
c:/tools/Sming/Sming/compiler/lib/\libsming.a(HardwareTimer.o): In function Hardware_Timer::getIntervalUs()': C:\tools\sming\Sming/SmingCore/HardwareTimer.cpp:43: multiple definition ofhardwareTimer'
c:/tools/Sming/Sming/compiler/lib/\libsming.a(HardwareServo.o):C:\tools\sming\Sming/Libraries/HardwareServo/../../SmingCore/Boards.h:17: first defined here
collect2.exe: error: ld returned 1 exit status
robotiko
@robotiko
Nov 30 2015 16:59
@hreintke I know that you were dealign with johndoe ..
about the HW_timer
hreintke
@hreintke
Nov 30 2015 17:05
I asked him to make hw-timer separate from servo implementation
robotiko
@robotiko
Nov 30 2015 17:05
yup
is done
just checkout the latest develop
pulled the pr
and I have a duplication conflict
not sure if it was included in develop already
any clue?
hreintke
@hreintke
Nov 30 2015 17:12
Quick check, first time I looked into it.
robotiko
@robotiko
Nov 30 2015 17:13
I can guide you there
I cannot compile it
hreintke
@hreintke
Nov 30 2015 17:14
1/ much duplication from Timer class
2 / relating your issue There is a declaration "Hardware_Timer hardwareTimer;"
I don't think it should be in. base classes should only define the class, not instanciate them
robotiko
@robotiko
Nov 30 2015 17:15
well
I added soem comments
some
about the PW
PR
hreintke
@hreintke
Nov 30 2015 17:15
Except the "singelton classes" :smile:
robotiko
@robotiko
Nov 30 2015 17:15
adding all tests in the base app
makes it very "UNbasic example "
:D
@hreintke ok I got it
hreintke
@hreintke
Nov 30 2015 17:20
I think it now combines work for integration test and basic_example
robotiko
@robotiko
Nov 30 2015 17:20
yes
hreintke
@hreintke
Nov 30 2015 17:26
If you comment on the application I will do on the HW_Timer
Is HardwareServo the correct wording for the library ? it is using HWTimer but....
robotiko
@robotiko
Nov 30 2015 17:30
you are probably right
all servo will be hardware stuff
servo should be a better choice
Dmitry Kireev
@kireevco
Nov 30 2015 18:04
iteration #1xxx
seems that it had finished
zhivko
@zhivko
Nov 30 2015 19:06
hey guys!
Anyone tried sdk 1.5?
I am trying it on linux and I am receiving:
/home/kz/esp8266/esp-open-sdk/sdk/lib/libwpa.a(wpa_auth.o): In function `wpa_receive':
(.irom0.text+0x9a0): undefined reference to `aes_wrap'
/home/kz/git/Sming/Sming/Makefile-rboot.mk:318: recipe for target 'out/build/app_0.out' failed
/home/kz/esp8266/esp-open-sdk/sdk/lib/libwpa.a(wpa_auth.o): In function `__wpa_send_eapol':
(.irom0.text+0xd73): undefined reference to `aes_wrap'
collect2: error: ld returned 1 exit status
make: *** [out/build/app_0.out] Error 1
@alonewolfx2 are you here?
zhivko
@zhivko
Nov 30 2015 19:12
Where in makefile should I add: libcrypto libwpa ?
Great: I added line: EXTRA_LIBS = crypto wpa to Makefile-user.mk - and my project compiled with 1.5 sdk :)
zhivko
@zhivko
Nov 30 2015 19:28
@hreintke: I think I find the cause of my issues yesterday - it sounds unbelievable, but if I use os_delay_us instead delayMicroseconds, I dont have resets anymore - crazy hah?
Dmitry Kireev
@kireevco
Nov 30 2015 19:29
@alonewolfx2 hey, when you have time, could you try my esp-alt-sdk?
@zhivko and @robotiko are welcome too :)
zhivko
@zhivko
Nov 30 2015 19:42
Ups - again I made wrong diagnosis...
I think I have issue with my serial adapter...
hreintke
@hreintke
Nov 30 2015 19:53
This message was deleted
@zhivko :
reason might be that delayMicroseconds id a flash function and os_delay_us is a RAM function.
Could you add the IRAM_ATTR to to delayMicroseconds and re-test ?
@zhivko : @alonewolfx2 : When having added the crypto library update, does app still compile/run with SDK 1.4.0 ?
zhivko
@zhivko
Nov 30 2015 20:04
@hreintke : I just added with extra_libs in my makefile-user-mk
@hreintke where can I add this IRAM_ATTR?
but in clock.cpp delayMicroseconds is referencing:
void delayMicroseconds(uint32_t time)
{
os_delay_us(time);
}
so it is basically same function... I think...
alonewolfx2
@alonewolfx2
Nov 30 2015 20:07
@hreintke yes. i told you before. its compatible with sdk 1.4
@kireevco any change for windows compile ?
hreintke
@hreintke
Nov 30 2015 20:08
Use :
void IRAM_ATTR delayMicroseconds(uint32_t time)
{
os_delay_us(time);
}
hreintke
@hreintke
Nov 30 2015 20:15
@alonewolfx2 :
But if I change my make file to include crypt ( in my SDK 1.4.0 environment) I get :
"c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/bin/ld.exe: cannot find -lcrypt"
alonewolfx2
@alonewolfx2
Nov 30 2015 20:16
library?
zhivko
@zhivko
Nov 30 2015 20:16
@hreintke: I made now again test with delayMicroseconds from Sming - and when the thing crashes - it crashes in that way that I must do flashinit and than flash from serial port if I want to get in working state !
alonewolfx2
@alonewolfx2
Nov 30 2015 20:16
@kireevco same result it didnt compile on my win10 x64 system
zhivko
@zhivko
Nov 30 2015 20:17
now I am running with os_delay_us and no crashing !
@hreintke I assume also I need to change in .h file ?
@hreintke I made changes and now no crashing - you were right about IRAM_ATTR delayMicroseconds
@hreintke obviously delayMicroseconds needs to be in ram if processor wants to execute it quickly? or what is the reason behind this?
zhivko
@zhivko
Nov 30 2015 20:22
I guess delayMicroseconds(5) is hard to do if it isnt in RAM or what ?
hreintke
@hreintke
Nov 30 2015 20:24
Yes, delayMicroseconds needs to be in RAM.
It is not the "speed" but when a function is run from flash, it needs to be read from flash before. And that reading can't be done in an interrupt routine.
That is also my remark on using HW_Timer (or other "low level" interrupts).
You need to be very careful not to use "flashed functions"
zhivko
@zhivko
Nov 30 2015 20:28
OK Understand - but HW_Timer really works precisely as I want - sw timer was simply not reliable enough - wifi stack interuptions - etc...
I'm happy that we found and removed an issue with restarting when using delayMicrosecond in hwtimer interrupt routine.
hreintke
@hreintke
Nov 30 2015 20:30
I know, and for that reason it is good to use HW_Timer for very reliable timing.
Just saying : only use it when absolutely necessary to prevent crashes like these.
slaff
@slaff
Nov 30 2015 20:43
blob
alonewolfx2
@alonewolfx2
Nov 30 2015 20:44
@slaff ?
slaff
@slaff
Nov 30 2015 20:44
A small teaser for you: live remote debugging from Eclipse on esp8266 running Sming. Done entirely with open-source tools :)
alonewolfx2
@alonewolfx2
Nov 30 2015 20:45
do we need any debugger tools?
zhivko
@zhivko
Nov 30 2015 20:45
Yes!
Great.
@slaff shoot!
robotiko
@robotiko
Nov 30 2015 20:46
@slaff that is cool as hell
zhivko
@zhivko
Nov 30 2015 20:47
Gdb?
slaff
@slaff
Nov 30 2015 20:47
Yes Indeed :) And you can do all the cool things like changing values of variables during debugging :)
alonewolfx2
@alonewolfx2
Nov 30 2015 20:48
very good. @slaff which debugger?
slaff
@slaff
Nov 30 2015 20:48
I did a small video as a second teaser but will need 50 more minutes to upload.
alonewolfx2
@alonewolfx2
Nov 30 2015 20:48
is it cheap?
zhivko
@zhivko
Nov 30 2015 20:48
Please share config
slaff
@slaff
Nov 30 2015 20:48
Debugger: gdb. Cost: $0.
alonewolfx2
@alonewolfx2
Nov 30 2015 20:49
i dont understand
zhivko
@zhivko
Nov 30 2015 20:50
What pins on esp u use? Rx tx?
slaff
@slaff
Nov 30 2015 20:50
I will try to explain quickly how everyone here can test it.
alonewolfx2
@alonewolfx2
Nov 30 2015 20:50
thank you
slaff
@slaff
Nov 30 2015 20:50
As a start clone this repo: https://github.com/slaff/Sming.git
And checkout the gdb-dev branch
hreintke
@hreintke
Nov 30 2015 20:51
@alonewolfx2 : In the time you are waiting for this Please check this :
@alonewolfx2 :
But if I change my make file to include crypt ( in my SDK 1.4.0 environment) I get :
"c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/bin/ld.exe: cannot find -lcrypt"
After you have compiled everything correctly you can test with the command line gdb by going to
cd <cloned-project>/Basic_Debug/
Then FLASH the new code on the device. After the flashing restart the device.
Then start gdb from the Basic_Debug directory:
$ xtensa-lx106-elf-gdb -x gdbcmds -b 115200
alonewolfx2
@alonewolfx2
Nov 30 2015 20:54
but i am on windows
slaff
@slaff
Nov 30 2015 20:54
and enjoy a command line show
Or use eclipse :)
As I did above
You need to create a new C++ Remote Debugging session. And you need to point to the xtensa debugger that you have for your OS.
alon24
@alon24
Nov 30 2015 20:55
@slaff does Mac work?
@slaff is this also for Windows
slaff
@slaff
Nov 30 2015 21:01

@zhivko

What pins on esp u use? Rx tx?

The debugging is a "software" debugging and it uses the normal serial pins. No need for JTag or other hardware.

Software debugging is limited on such devices, but still great!
robotiko
@robotiko
Nov 30 2015 21:02
@slaff I guess thi si based in espressif sdk for gdb
how many breakpints and vars ?
slaff
@slaff
Nov 30 2015 21:02

@slaff does Mac work?

As long as you have xtensa gdb debugger than the answer is yes.

robotiko
@robotiko
Nov 30 2015 21:02
*breakpoints
slaff
@slaff
Nov 30 2015 21:03
Max 1 hardware breakpoint and as much as desired software breakpoints.
robotiko
@robotiko
Nov 30 2015 21:03
also work on interrutps?
what is HW breakpoint?
slaff
@slaff
Nov 30 2015 21:03
There is a catch though. You cannot set breakpoints everywhere. Only on code that is in RAM.
alon24
@alon24
Nov 30 2015 21:03
what is hardware breakpoint
slaff
@slaff
Nov 30 2015 21:04
hbr is a hardware breakpoint. br is just the software breakpoint.
alon24
@alon24
Nov 30 2015 21:04
how do u set code to ram
robotiko
@robotiko
Nov 30 2015 21:04
hbr is a hardware breakpoint. br is just the software breakpoint.
what is the difference?
slaff
@slaff
Nov 30 2015 21:05

how do u set code to ram

Read the README. You can set it using attributes.

Or, but this is my wild guess, you can wait for the function code to be loaded from FLASH into RAM and then set breakpoints there.
slaff
@slaff
Nov 30 2015 21:27
This message was deleted

what is the difference?

Long story. Take a look at that explanation:
http://www.nynaeve.net/?p=80

alonewolfx2
@alonewolfx2
Nov 30 2015 21:32
@hreintke i dont have error message when compile with sdk14 or sdk15
slaff
@slaff
Nov 30 2015 21:46
Here is a small video demo of the live esp8266 debugging: https://www.youtube.com/watch?v=oVkwiyqHnvY
zhivko
@zhivko
Nov 30 2015 22:21

I have a problem GPIO16 not working with call:

    GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, pin_mask_steppers);
    delayMicroseconds(5);
    GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, pin_mask_steppers);   // Set pin a and b low
    delayMicroseconds(5);

pin_mask_steppers = 10010000000010100

pins 2, 12, 4 are working ok with that call pin 16 is not working - maybe somebody knows what is the reason for that ?
Dan Loman
@dloman
Nov 30 2015 22:22
@slaff is that debug setup with the current master if sming? which sdk?
zhivko
@zhivko
Nov 30 2015 22:23
This message was deleted
icodk
@icodk
Nov 30 2015 22:23
Building sming 1.4.0 fresh installation on Windows I get 8at the end of the build):
C+ Libraries/si4432/si4432.cpp
AR out/build/app_app.a
Installing libsming
cp: cannot stat `out/build/app_app.a': No such file or directory
make: * [out/build/app_app.a] Error 1
What's is wrong ?
zhivko
@zhivko
Nov 30 2015 22:24
@icodk have you setted up right SMING_HOME variable ?
icodk
@icodk
Nov 30 2015 22:24
echo %ESP_HOME%
c:\Espressif
echo %SMING_HOME%
C:\tools\sming\Sming
zhivko
@zhivko
Nov 30 2015 22:25
On my linux SMING_HOME is /home/kz/git/Sming/Sming
Big caps maybe sensitive ?
icodk
@icodk
Nov 30 2015 22:26
I am on Windows. However both pathes are correct case wise
Dmitry Kireev
@kireevco
Nov 30 2015 22:27
@alonewolfx2 weird, I updated path settings and such.. could you post the output?
@slaff whaaaatt.. can’t watch the video right now… what’s the setup? any howtos?
hreintke
@hreintke
Nov 30 2015 22:29
This message was deleted
icodk
@icodk
Nov 30 2015 22:29
@zhivko I am on Windows. However both pathes are correct case wise
hreintke
@hreintke
Nov 30 2015 22:30
@icodk :
Do you have stat.exe on your path ? With me it is in the msys environment
icodk
@icodk
Nov 30 2015 22:30
@zhivko I mean what is echoed is also the actual path
@hreintke No I haven't set stat.exe on my path. Should I do that ? Where is it ?
hreintke
@hreintke
Nov 30 2015 22:33
That's your issue : "cp: cannot stat `out/build/app_app.a': No such file or directory" -> missing stat.exe
at my system :
C:\>dir /b/s stat.exe
C:\MinGW_orig\msys\1.0\bin\stat.exe
C:\msys\msys\bin\stat.exe
zhivko
@zhivko
Nov 30 2015 22:34
@hreintke: maybe you know for my gpio16 issue ? it is strange that digitalWrite(16,true) would work but
GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, pin_mask_steppers);
not ?
hreintke
@hreintke
Nov 30 2015 22:35
@zhivko : No, no experience with that
robotiko
@robotiko
Nov 30 2015 22:35
@zhivko add that comment to the open issue
it is relevant
but yes
it can happen
zhivko
@zhivko
Nov 30 2015 22:35
what is issue # ?
ok I will try find myselve ;)
robotiko
@robotiko
Nov 30 2015 22:35
because teh issue is the register addressing and type
zhivko
@zhivko
Nov 30 2015 22:37
type is: uint32_t this can accomodate 32 pins theoretically ?
icodk
@icodk
Nov 30 2015 22:37
@hreintke My C:>dir /b/s stat.exe is still running will let you know when finished
@hreintke came out with : C:\MinGW_\msys\1.0\bin\stat.exe
hreintke
@hreintke
Nov 30 2015 22:38
So make sure that is on your path
zhivko
@zhivko
Nov 30 2015 22:38

define WRITE_PERI_REG(addr, val) (((volatile uint32_t )ETS_UNCACHED_ADDR(addr))) = (uint32_t)(val)

this is defined in eagle_soc.h
@robotiko: So I guess it should be fixed in espressif sdk?
icodk
@icodk
Nov 30 2015 22:43
@hreintke I got C:\tools\mingw64\msys\1.0\bin on my path and stat.exe is there
robotiko
@robotiko
Nov 30 2015 22:43
@zhivko there is a PR to fix register type
you can test
Dmitry Kireev
@kireevco
Nov 30 2015 22:44
Does anyone have time to test my sdk build?
robotiko
@robotiko
Nov 30 2015 22:44
if that fixes it
Dmitry Kireev
@kireevco
Nov 30 2015 22:44
O:-)
zhivko
@zhivko
Nov 30 2015 22:49
Ah yes I see it: SmingHub/Sming#398
icodk
@icodk
Nov 30 2015 23:07
@hreintke I think my problem is that the command : AR out/build/app_app.a does not produce out/build/app_app.a so stat can't find it. How do I make AR giving more information(varbos)?