Skip to content
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

BLE crash fixing (Part ?) #1756

Merged
merged 4 commits into from Jul 23, 2023
Merged

BLE crash fixing (Part ?) #1756

merged 4 commits into from Jul 23, 2023

Conversation

Ralim
Copy link
Owner

@Ralim Ralim commented Jul 23, 2023

  • Please check if the PR fulfills these requirements
  • The changes have been tested locally (Via @gamelaster )
  • There are no breaking changes (AFAIK)

@gamelaster tracked down the issue for the crash was the args to printf being bad causing invalid args to malloc. This occurs in the binary blob for BLE, so not trivial to fix or patch.
Luckily by remapping printf at link time to redirect to the bfl implementation it lines up.
Now this appears that on the failing unit it will print roscal fail, which we have NFI what it means.
It appears to be a warning something internally failed to calibrate (we are guessing an RC Oscillator) but also we have found that otherwise it appears to continue with BLE working (on a sample unit count of 1).

At the least this looks to prevent the crash. Further testing to be done on if any impacts otherwise.

Would suuper love reports of this working or failing.

EDIT:
Seems to fix #1661

@Ralim Ralim changed the title BLE crash fixing (Part 1) BLE crash fixing (Part ?) Jul 23, 2023
@PReDiToR
Copy link

Hi. I ran this up after Gamiee posted it in PineCil Pine64 channel.
It hasn't crashed on me, and is visible on my phone, I used blisp 0.0.3 on Linux (I use Arch, btw) to flash.
I'm getting full heat and the display shows 27v (Rocoren PSU and EPR cable).
photo_2023-07-23_19-18-55

ia and others added 2 commits July 24, 2023 00:00
Unify formatting for changes in source/Makefile
@Ralim Ralim merged commit 6ba2a5c into dev Jul 23, 2023
30 checks passed
@Ralim Ralim deleted the pinecilv2-ble-investigation branch July 23, 2023 23:07
@Ralim Ralim added this to the 2.22 milestone Jul 23, 2023
@PSandro
Copy link

PSandro commented Jul 24, 2023

@gamelaster could you explain briefly how you were able to track this issue down? I was trying to get a stacktrace using openOCD but were unsuccessful. Would be nice to hear how you approached this!

@Ralim
Copy link
Owner Author

Ralim commented Jul 24, 2023

Hia,

To the best of my knowledge this was openocd with a debug build loaded in; and then tracing backtrace and looking at args into malloc.
IMG_20230724_193325_252.jpg

IMG_20230724_193321_110.jpg

@gamelaster can probably say more, I have limited knowledge here 😜

@gamelaster
Copy link
Collaborator

@PSandro I am at work now, but when I will come back, I will write / record the process and also explain where was the issue. :) Until that, checkout @Ralim answer 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pinecil v2 doesn't work after updating to v2.21
6 participants