Some Nicer Errors for SDCC
Dave Jones (from the EEVblog) just released a video series about programming the Padauk "3 cent" micro-controllers using open source tooling. During the series he uses SSDC and hits a non-descriptive error that trips him up for a while, until he figures out what's going on.
I've wasted time with similar non-descriptive error messages before, so I decided to spend a few minutes writing a patch, hoping to save somebody time in the future. :)
Old error message, when running in a directory wit no write-permission.
$ sdcc test.c
test.c:2: error 4: 'fopen' failed on file 'test.asm'
New error message:
$ sdcc test.c
test.c:2: error 257: Failed to open output file 'test.asm' (Permission denied)
It's a minor change, but hopefully makes it easier to diagnose issues!
SDCC patch: Small Device C Compiler Ticket #320
Part one of EEVblog's Padauk video series: EEVblog #1306 (1 of 5): 3 Cent Micro - Open Source Programmer