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

Proper error handler #63

Open
kbeckmann opened this issue May 5, 2018 · 8 comments
Open

Proper error handler #63

kbeckmann opened this issue May 5, 2018 · 8 comments
Assignees

Comments

@kbeckmann
Copy link
Member

Not sure how much energy we should spend on this but it kinda sucks to do

if (r != ERR_OK)
	while (1) ;

We don't need to do fancy ram dumping and so on, but just halt the cpu and perhaps disable interrupts and that we get a central point where we can set a breakpoint when debugging.

@kbeckmann kbeckmann assigned kbeckmann and EnJens and unassigned kbeckmann May 5, 2018
@arturo182
Copy link
Contributor

It was just made like this because when I wrote it we had no UART support, now we could actually print to uart or do something else that's smart :P

@kbeckmann
Copy link
Member Author

Ideally we should print it to the control cdc that hasn't been implemented yet.. :P

@arturo182
Copy link
Contributor

It is now ;)

@arturo182
Copy link
Contributor

If we implement the HID CLI mentioned in #44 then we could actually have ram dumping and then fetching over CLI. But we would need to use 64K of flash for the dump area.

@kbeckmann
Copy link
Member Author

Think we can survive with an error handler that stalls the cpu and lets you attach with a debugger..

@arturo182
Copy link
Contributor

Debugging a debugger :O

@EnJens
Copy link
Contributor

EnJens commented May 9, 2018

we could have 'offline' semi-dumps where we just dump the absolutely minimum, say current PC of all threads, the last few lines of logs, just the bare minimum to get something useful. Wouldn't take many KB.

@arturo182
Copy link
Contributor

we don't really have logs right now :P can't just print on the cdc cause can't know if that was log or dut uart

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

No branches or pull requests

3 participants