Closed noumenonquest closed 7 years ago
I need the files to test, I have no experience about avr projects. Thanks.
I fixed. Thanks.
[Build] D:/Documents/Arduino/avr01...
[Step 1] Check Toolchain.
[Step 2] Find all source files.
[Step 3] Start building.
[25.0%] Compiling avr01.ino.cpp...
[50.0%] Compiling USART.c...
[75.0%] Linking everything together...
[100.0%] Creating binary files...
Sketch uses 292 bytes (0.1%) of program storage space. Maximum is 253,952 bytes.
Global variables use 0 bytes (0.0%) of dynamic memory, leaving 8,192 bytes for local variables. Maximum is 8,192 bytes.
Build done.
now i get the following error.
[Step 1] Check Toolchain.
[Step 2] Find all source files.
[Step 3] Start building.
[20.0%] Compiling ...
avr-g++: error: : No such file or directory
avr-g++: fatal error: no input files
compilation terminated.
[Build] Error occurred.
you can use Elliot Williams examples. place the following files in one folder.
main.c
#include <avr/io.h>
#include <util/delay.h>
#include "USART.h"
int main(void) {
char serialCharacter;
// -------- Inits --------- //
DDRB = 0xFF; /* set up LEDs for output */
initUSART();
printString("Hello World!\r\n"); /* to test */
// ------ Event loop ------ //
while (1) {
serialCharacter = receiveByte();
transmitByte(serialCharacter);
PORTB = serialCharacter;
/* display ascii/numeric value of character */
} /* End event loop */
return 0;
}
Thanks for your sketch, I fixed.
[Build] D:/Documents/Arduino/main...
[Step 1] Check Toolchain.
[Step 2] Find all source files.
[Step 3] Start building.
[25.0%] Compiling main.c...
[50.0%] Compiling USART.c...
[75.0%] Linking everything together...
[100.0%] Creating binary files...
Sketch uses 266 bytes (0.8%) of program storage space. Maximum is 32,256 bytes.
Global variables use 16 bytes (0.8%) of dynamic memory, leaving 2,032 bytes for local variables. Maximum is 2,048 bytes.
Build done.
Thanks.
Problem building avr c program with a header file and a separate source code file(.c) to define the functions that are in the header file.