-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Can't correctly mount SD card on a PX4 (V1) setup #1691
Comments
Thanks for the report! Could you revert this diff and let us know if that changes anything? @@ -417,7 +417,7 @@ CONFIG_PREALLOC_TIMERS=50
# Stack and heap information
#
CONFIG_IDLETHREAD_STACKSIZE=3500
-CONFIG_USERMAIN_STACKSIZE=3000
+CONFIG_USERMAIN_STACKSIZE=2600
CONFIG_PTHREAD_STACK_MIN=512
CONFIG_PTHREAD_STACK_DEFAULT=2048
@@ -719,11 +719,11 @@ CONFIG_SCHED_WORKQUEUE=y
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_WORKPRIORITY=192
CONFIG_SCHED_WORKPERIOD=5000
-CONFIG_SCHED_WORKSTACKSIZE=2048
+CONFIG_SCHED_WORKSTACKSIZE=1800
CONFIG_SCHED_LPWORK=y
CONFIG_SCHED_LPWORKPRIORITY=50
CONFIG_SCHED_LPWORKPERIOD=50000
-CONFIG_SCHED_LPWORKSTACKSIZE=2048
+CONFIG_SCHED_LPWORKSTACKSIZE=1800
# CONFIG_LIB_KBDCODEC is not set
# CONFIG_LIB_SLCDCODEC is not set |
Other than that a GIT bisect between master and stable would be great. I tried to linearize our history in the last weeks, so it should be a bit easier than previously. |
@sjwilks Since you fixed the landing detector I presume you somehow were able to boot - what is the status of this issue? |
This isn't fixed yet. I can't sit down for very long at one time at the moment but what I think is happening is there seems to be an issue with flashing updates to the PX4IO somehow. At one point I noticed the firmware update tone started and was overridden by something else. Now I can reproduce the failure by flashing a local vs continuous build one and microsd access isn't working until I force an IO flash (power on with safety button held down). Of course this might just be introducing a delay and isn't directly related. Still looking when I get free blocks of time. Up next, hook up the debug cable. |
@sjwilks When you are unable to run |
Memory is fine (32k free). Let me check again with the land_detector fix branch vs current master via QGC to make sure the missing land_detector isn't having a strange effect...even though it's started much later than the mounting of the sd card. |
Nope. So one of two things happen: either I can't cd to the microsd directory or I can and it appears to be empty. Timing: can I add a delay somewhere to verify this? |
I just built and installed master on px4fmu-v2 and the pio FW upgrade works from boot with pio running or boot with pio running the bootloader. Is this only on v1? |
Yep. V2 is fine. It's only V1. I probably should try with a second V1 just On Sat, 24 Jan 2015 17:24 David Sidrane [email protected] wrote:
|
Is one of the symptoms that the fmu try to reprogram the pio on every reset or power on? |
I don't think it is trying to everytime. The startup sequence below doesn't try to program it. Interesting is through that after mounting the microsd there are some ops (ie: dataman) that appear to succeed but once booting is complete the microsd isn't available.
|
I forced a flash and this time it didn't help:
I'll have more time tomorrow to look more systematically at this. I'll also do a git bisect. |
OK, I found the problem but it took hours as there was some nasty behavior when flashing different versions as a good version would suddenly also fail if a bad version was flashed before returning to it. Seemed to be related to the flashed px4io firmware at the time. In the end carefully manually bisecting prioritising V1 changes narrowed it down to: FMUv1: Disable stack checking (e62c8d7) @LorenzMeier should this simply be re-enabled or were there followup changes that depend on this? Or an alternative approach? |
No, it should not, as we have no resources to keep it enabled. There are two potential explanations: a) The stack checking wasn't fully disabled. But I did check in the completely compile output of all configs that it in fact is. And b) there was a race condition present for the whole time, which is now exposed. @davids5 Do you have FMUv1 hardware? If not, could you ask 3DR to ship you some? @sjwilks Could you try nuttx_bringup and see if that works better for you? The new version might have fixed what you're currently running into. |
With CONFIG_ARMV7M_STACKCHECK=n: With CONFIG_ARMV7M_STACKCHECK=y: After arming free space for the latter drops to 14k. Using nuttx_bringup and then merging current master works with the stack check disabled. My proposal would be re-enabling the stack check in master now until NuttX 7 is ready as master is currently broken for FMUV1 hardware. |
@LorenzMeier I have requested V1 HW. |
@sjwilks Did the memcpy fix that is currently on master and nuttx_bringup fix this issue on V1 HW (with stack checking off)? |
I'll re - test this morning and let you know. On Fri, 30 Jan 2015 00:42 David Sidrane [email protected] wrote:
|
This is still an issue on the current master. Flashing and then trying to access /fs/microsd fails. I'm have issue building nuttx_bringup this time so I can't yet verify if this fixes it or not. @davids5 did you receive a V1 setup? |
Yes. I did. This may be related to a bug clobbering the heap. I am looking at now. If I can get to this today. I will, if not it will be beginning of next week |
Very likely fixed here, please re-test with PX4/Firmware master. |
A test with the latest master works :) I tried powering via USB as well as battery which according to one user caused different results. Thanks! |
The current master (via QGC but also locally built) on a V1 setup will show the microSD card as mounted but no files are visible. Master version will follow but it was flashed mid afternoon CET.
Stable works fine. The issue does not effect Pixhawks (V2).
The text was updated successfully, but these errors were encountered: