Go Down

Topic: New Makefile structure in optiboot source repository. (Read 2122 times) previous topic - next topic

Coding Badly


...but I'll have to change Tiny Tuner to tune against 115200 instead of 9600.  (Well, someone will.)

westfw


Would it be possible to print a baudrate error during the build?

Implemented.
It was fun, since I wanted to be sure it would work on systems with only the minimal Arduino-IDE compile tools (no "developer tools" on mac, no C compiler on windows.)  I ended up using the avr-gcc preprocessor to generate a shell script :-)  (ok, so that might have been going overboard.)
make pro8
make atmega168 AVR_FREQ=8000000L LED_START_FLASHES=3
BAUD RATE CHECK: Desired: 115200, Real: 111111, UBRRL = 8, Error=3.5%
avr-gcc -g -Wall -Os -fno-inline-small-functions -fno-split-wide-types -mshort-calls -mmcu=atmega168 -DF_CPU=8000000L  -DBAUD_RATE=115200 -DLED_START_FLASHES=3       -c -o optiboot.o optiboot.c
optiboot.c:254:2: warning: #warning BAUD_RATE error greater than 2%

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy