These are chat archives for SmingHub/Sming

28th
Mar 2016
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 17:28
hi .. i'm trying to use FTP server in Sming. I use a spiffs partition which also used for web files and configuration storage. Login, User, Password works, but if i try a ls/dir command, it immediately crashes .. Any idea someone?
'Fatal exception 9(LoadStoreAlignmentCause):
epc1=0x4023f082, epc2=0x00000000, epc3=0x00000000, excvaddr=0x726566e5, depc=0x00000000'
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 17:52
btw same for get/put commands
alonewolfx2
@alonewolfx2
Mar 28 2016 18:00
@happycodingrobot I had same issue
Seems it has a bug
I didnt found yet
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 18:04
@alonewolfx2 i hadn't found infos about the fata exception 9 yet
LoadStoreAlignmentCause sounds like it has an memory alignment issue
Patrick Jahns
@patrickjahns
Mar 28 2016 18:09
@HappyCodingRobot @alonewolfx2
you can use xtensa addr2line tools to find out more from the exception
sometimes this helps to pinpoint which line/function hast the issue
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 18:17
@patrickjahns thx .. gives some more information :)
the problem seems to be in TcpConnection.cpp : TcpConnection::onSent , line 88
hreintke
@hreintke
Mar 28 2016 18:39
@alonewolfx2 : see page 89
This message was deleted
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 18:43
'l16ui a2, a2, 114' seems to cause this
hreintke
@hreintke
Mar 28 2016 18:44
This message was deleted
@HappyCodingRobot :
To much detail for a start. Any specific in the debugf logs ? and ftp client logs ?
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 18:48
@hreintke sadly i'm not familiar with the xtensa assembly.
ok, i take a look at the debugf output
hreintke
@hreintke
Mar 28 2016 18:49
This message was deleted
This message was deleted
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 18:52

+TCP connection
timeout updating: 70 -> 900
TcpServer onClient: 192.168.xxx.xxx
USER: 'esp'

331 OK
PASS: 'esp'
checkUser: esp esp
230 OK
SYST: ''
215 Windows_NT: Sming Framework
PORT: '192,168,xxx,xxx,164,87'
connection to: 192.168.xxx.xxx, 42071
200 OK

LIST: ''
+TCP connection
TcpConnection::connect result:, 0

150 Connecting
OnConnected
timeout updating: 70 -> 300
TCP connected
send file list: 11
open errno -10006
TCP connection closing
~TCP connection
226 Transfer Complete.
TCP sent: 538
Fatal exception 9(LoadStoreAlignmentCause):
epc1=0x4023f082, epc2=0x00000000, epc3=0x00000000, excvaddr=0x726566e5, depc=0x00000000

this is the complete output from ftp: open, user,passwd,ls
the ftp client gives no extra information, it just loses connection
hreintke
@hreintke
Mar 28 2016 18:55
That shows the error -> spiffs read "open errno -10006"
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 18:55
there are 8 files in the spiffs
ok ..
hreintke
@hreintke
Mar 28 2016 18:55
always look in the debugf and check for error first
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 18:58
yes, your are right ..
but .. what does SPIFFS_ERR_NOT_INDEX mean?
hreintke
@hreintke
Mar 28 2016 18:59
Again, don't go in the details at a start.
What is your spiffs size/spiffs location/spi size ?
How did you get your files on the spiffs ?
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 19:00
128k spiffs size, the files inside have around 60.7k
the files are included on build process
hreintke
@hreintke
Mar 28 2016 19:06
I presume there is a mismatch in the spiffs size on flash & flash size in application.
In NONOS that cannot be checked so is undiscovered at mount time.
What is your spi size ? not physical but in the makefiles ?
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 19:07
in the user makefile i've declared SPI_SIZE = 4M
this fits the phy size
but ... i'm not sure where it is written to
testing ..
hreintke
@hreintke
Mar 28 2016 19:10
using rboot ?
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 19:10
no
ok spiffs starts at 0x0004c000
hreintke
@hreintke
Mar 28 2016 19:14
The issue is that sming (within the application) cannot identify the size of the spiffs created in the build process and then does a guess.
Any possibility that you move to RTOS. It is fixed there.
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 19:17
actually i've not he time :/ .. it is planned
does rboot bring some improvements?
hreintke
@hreintke
Mar 28 2016 19:23
rboot apps use the spiffs_mount_manual where you specify the correct spiffs size
hreintke
@hreintke
Mar 28 2016 19:29
As a hack you can try to do the spiffs_mount_manual with the at 0x40200000 + 0x0004c000 and size128K.
But you must make sure that you update that when your app size grows
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 19:31
thx .. i think this is the first step, then move to rboot and later to RTOS
hreintke
@hreintke
Mar 28 2016 19:31
better to go to RTOS and then to rboot
Moving from nonos to rtos is not a big task
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 19:32
um .. i'm a bit scared ;) i've had short contact with freeROS a longer time ago and it was quite different
much more to do with task and event handling ..
hreintke
@hreintke
Mar 28 2016 19:34
Sming_RTOS hides all from freertos. Application code doesn't need a change. Only inlcude files & user_config.h
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 19:34
ok .. sounds not too bad ..i give it a try in the next days
also it would be a good practise to port my lib to it ;)
hreintke
@hreintke
Mar 28 2016 19:36
For lib porting (from nonos) is the same statement. Include files & no coding update.
HappyCodingRobot
@HappyCodingRobot
Mar 28 2016 19:38
ok .. thx
hreintke
@hreintke
Mar 28 2016 19:38
OK, I am out for now. Leave a message when more questions/remarks.