Makefile Rule hinzufügen

OP #665514
Hallo zusammen :)

Ich versuche mich grade an nem makefile.(siehe Anhang)
meine frage ist nun wie ichs schaffe das mir make noch ein .bin erzeugt.
Ich brauche das weil ich das ganze noch mit OpenOCD flashen will und 
zwar mit diesem code:
1
# **********************************************************************************************
2
#                            FLASH PROGRAMMING      (using OpenOCD and Amontec JTAGKey)
3
#
4
# Alternate make target for flash programming only
5
#
6
# You must create a special Eclipse make target (program) to run this part of the makefile 
7
# (Project -> Create Make Target...  then set the Target Name and Make Target to "program")
8
#
9
# OpenOCD is run in "batch" mode with a special configuration file and a script file containing
10
# the flash commands. When flash programming completes, OpenOCD terminates.
11
#
12
# Note that the make file below creates the script file of flash commands "on the fly"
13
#
14
# Programmers: Martin Thomas, Joseph M Dupre, James P Lynch
15
# **********************************************************************************************
16

17
# specify output filename here (must be *.bin file)
18
TARGET = main.bin
19

20
# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
21
OPENOCD_DIR = 'c:\Program Files\openocd-2006re93\bin\'
22

23
# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
24
#OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
25
OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
26

27
# specify OpenOCD configuration file (pick the one for your device)
28
#OPENOCD_CFG = $(OPENOCD_DIR)at91sam7s256-wiggler-flash-program.cfg
29
#OPENOCD_CFG = $(OPENOCD_DIR)at91sam7s256-jtagkey-flash-program.cfg
30
OPENOCD_CFG = $(OPENOCD_DIR)at91sam7s256-armusbocd-flash-program.cfg
31

32
# specify the name and folder of the flash programming script file
33
OPENOCD_SCRIPT = c:\temp\temp.ocd
34

35
# program the AT91SAM7S256 internal flash memory
36
program: $(TARGET)
37
  @echo "Preparing OpenOCD script..."
38
  @cmd /c 'echo wait_halt > $(OPENOCD_SCRIPT)'
39
  @cmd /c 'echo armv4_5 core_state arm >> $(OPENOCD_SCRIPT)'
40
  @cmd /c 'echo flash write 0 $(TARGET) 0x0 >> $(OPENOCD_SCRIPT)'
41
  @cmd /c 'echo mww 0xfffffd08 0xa5000401 >> $(OPENOCD_SCRIPT)'
42
  @cmd /c 'echo reset >> $(OPENOCD_SCRIPT)'
43
  @cmd /c 'echo shutdown >> $(OPENOCD_SCRIPT)'
44
  @echo "Flash Programming with OpenOCD..."
45
  $(OPENOCD) -f $(OPENOCD_CFG)
46
  @echo "Flash Programming Finished."

welchen ich von J. Lynch geklaut hab. hier wird ein .bin verlangt, und 
ich  hab keine ahnung wie ich das noch einbinden soll.
Wäre super wenn mir da einer die nötigen zeilen verraten könnte :)

Danke

MFG

(LPC2368 ist der uC)
Angehängte Dateien:

Antwort schreiben

Eine eigene Frage? Dieser Thread ist über 19 Jahre alt. Stell sie in einem eigenen Thread – dort lesen mehr Leute mit, und sie wird öfter und schneller beantwortet.

Neuen Thread starten

Eine Lösung, Ergänzung oder Rückmeldung zu diesem Thread? Dann antworte hier.

Formatierung
  • [c]C-Code[/c]
  • [code]Code in anderen Sprachen, ASCII-Zeichnungen[/code]
  • [math]Formel in LaTeX-Syntax[/math]
  • [[Titel]] – Link zu einem Artikel
  • Verweis auf einen anderen Beitrag: Rechtsklick auf dessen Beitrags-ID (#8078628), „Adresse kopieren“, in den Text einfügen

Mehr zur Formatierung

Längeren Sourcecode als Anhang, nicht in den Text. JPG nur für Fotos und Scans; Zeichnungen und Screenshots als PNG oder GIF. Siehe Bildformate.

Schon registriert? Anmelden

Wird nicht angezeigt. Wir schicken dir einen Link; sobald du damit bestätigst, erscheint dein Beitrag.

Mit dem Abschicken legst du einen kostenlosen Account an und erkennst die Nutzungsbedingungen und die Datenschutzerklärung an.