Pages: 1 [2]   Go Down
Author Topic: New Makefile structure in optiboot source repository.  (Read 1835 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Online Online
Shannon Member
Karma: 209
Posts: 13017
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

SF Bay Area (USA)
Offline Offline
Tesla Member
Karma: 135
Posts: 6782
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Would it be possible to print a baudrate error during the build?
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%

Pages: 1 [2]   Go Up
Jump to: