- 12V Akku mit 280 Ah bauen         
Ergebnis 391 bis 400 von 405

Thema: Alternative zu Flashnnn.exe

Baum-Darstellung

Vorheriger Beitrag Vorheriger Beitrag   Nächster Beitrag Nächster Beitrag
  1. #11
    Benutzer Stammmitglied
    Registriert seit
    25.04.2007
    Beiträge
    54

    Mit dem Kopf durch die Wand ...

    Hallo Osser,
    um überhaupt erst man ein Erfolgserlebnis zu bekommen, habe ich Deinen Ratschlag befolgt und bin dabei ganz einfach mit dem Kopf durch die Wand.
    Ich habe mir mein Beispielprogramm:

    // Blink: Turns on an LED on for one second, then off for one second...

    # include "Arduino.h"

    // Pin 13 has an LED connected on most Arduino boards.
    int led = 13; // give it a name:

    // the setup routine runs once when you press reset:
    void setup()
    {
    pinMode(led, OUTPUT); // initialize the digital pin as an output.
    }

    // the loop routine runs over and over again forever:
    void loop()
    {
    digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
    delay(1000); // wait for a second
    digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
    delay(1000); // wait for a second
    }
    mit der original Arduino-IDE 1.0 compilieren lassen. Die Compilermeldungen habe ich ganz einfach in den pn-Editor kopiert, die entsprechenden Befehle extrahiert, den Rest gelöscht und die AsuroFlash-Variablen eingefügt. Herausgekommen ist folgendes:

    @set path=%AF_PRGDIR%\Arduino\hardware\tools\avr\bin\;% path%
    avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_PRJDIR%\%AF_SOURCE_FILES% -o%AF_PRJDIR%\%AF_SOURCE_FILES%.o
    avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\WInterrupts.c -o%AF_PRJDIR%\WInterrupts.c.o
    avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\wiring.c -o%AF_PRJDIR%\wiring.c.o
    avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\wiring_analog.c -o%AF_PRJDIR%\wiring_analog.c.o
    avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\wiring_digital.c -o%AF_PRJDIR%\wiring_digital.c.o
    avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\wiring_pulse.c -o%AF_PRJDIR%\wiring_pulse.c.o
    avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_PRJDIR%\%AF_SOURCE_FILES% -o%AF_PRJDIR%\%AF_SOURCE_FILES%.o
    avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\WInterrupts.c -o%AF_PRJDIR%\WInterrupts.c.o
    avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\wiring.c -o%AF_PRJDIR%\wiring.c.o
    avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\wiring_analog.c -o%AF_PRJDIR%\wiring_analog.c.o
    avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\wiring_digital.c -o%AF_PRJDIR%\wiring_digital.c.o
    avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\wiring_pulse.c -o%AF_PRJDIR%\wiring_pulse.c.o
    avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\wiring_shift.c -o%AF_PRJDIR%\wiring_shift.c.o
    avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\CDC.cpp -o%AF_PRJDIR%\CDC.cpp.o
    avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\HID.cpp -o%AF_PRJDIR%\HID.cpp.o
    avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\HardwareSerial.cpp -o%AF_PRJDIR%\HardwareSerial.cpp.o
    avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\IPAddress.cpp -o%AF_PRJDIR%\IPAddress.cpp.o
    avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\Print.cpp -o%AF_PRJDIR%\Print.cpp.o
    avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\Stream.cpp -o%AF_PRJDIR%\Stream.cpp.o
    avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\Tone.cpp -o%AF_PRJDIR%\Tone.cpp.o
    avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\USBCore.cpp -o%AF_PRJDIR%\USBCore.cpp.o
    avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\WMath.cpp -o%AF_PRJDIR%\WMath.cpp.o
    avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\WString.cpp -o%AF_PRJDIR%\WString.cpp.o
    avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I%AF_ARDCORES% -I%AF_ARDTYPES% %AF_ARDCORES%\main.cpp -o%AF_PRJDIR%\main.cpp.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\WInterrupts.c.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\wiring.c.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\wiring_analog.c.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\wiring_digital.c.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\wiring_pulse.c.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\wiring_shift.c.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\CDC.cpp.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\HID.cpp.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\HardwareSerial.cpp.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\IPAddress.cpp.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\Print.cpp.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\Stream.cpp.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\Tone.cpp.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\USBCore.cpp.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\WMath.cpp.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\WString.cpp.o
    avr-ar rcs %AF_PRJDIR%\core.a %AF_PRJDIR%\main.cpp.o
    avr-gcc -Os -Wl,--gc-sections -mmcu=atmega328p -o %AF_PRJDIR%\%AF_SOURCE_FILES%.elf %AF_PRJDIR%\%AF_SOURCE_FILES%.o %AF_PRJDIR%\core.a -L%AF_PRJDIR% -lm
    avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 %AF_PRJDIR%\%AF_SOURCE_FILES%.elf %AF_PRJDIR%\%AF_SOURCE_FILES%.eep
    avr-objcopy -O ihex -R .eeprom %AF_PRJDIR%\%AF_SOURCE_FILES%.elf %AF_PRJDIR%\%AF_SOURCE_FILES%.hex
    Eingetragen habe ich diesen Befehlsblock im Config-Menue unter Make all. Ein makefile ist dann nicht mehr notwendig. Das Fenster Make file im Config-Menue bleibt also leer.
    Das Aufräumen erfolgt durch einige wenige Befehle im Fenster Make clean im Config-Menue:

    del %AF_PRJDIR%\*.o
    del %AF_PRJDIR%\*.a
    del %AF_PRJDIR%\*.eep
    del %AF_PRJDIR%\*.elf
    Zusätzlich zu den Standardvariablen zeigt
    AF_ARDCORES in den Arduino-Ordner ..\hardware\arduino\cores\arduino und
    AF_ARDTYPES in den Arduino-Ordner ..\hardware\arduino\variants\standard (Uno-Board!)

    Die Arduino-Installation befindet sich im Verzeichnis von AsuroFlash im Unterordner Arduino.

    Das ganze Verfahren ist sicher alles andere als professionell, aber immerhin ein Ansatz, der schon mal funktioniert.

    An der makefile-Vorlage, die ich weiter oben erwähnt habe, bin ich bislang gescheitert.

    Gruss
    Ulli
    Geändert von ukuchel (05.01.2014 um 17:40 Uhr) Grund: Fehler im Code

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  

Labornetzteil AliExpress