STM32-P103_blink_RAM_Error makefile 88: Colon expected

Started by Houston, June 12, 2013, 10:07:05 AM

Previous topic - Next topic

Houston

Hello!

What could be the reason of this (when pushing a Build button in Eclipse Helios):
**** Build of configuration Default for project STM32-P103_blink_RAM ****

make all
MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
Error makefile 88: Colon expected
Error makefile 89: Command syntax error
*** 2 errors during make ***


Part of a code from Makefile, in red there are these colons.
# Flags
CFLAGS = -Wall -fno-common -c -g -mcpu=cortex-m3 -mthumb
CFLAGS += -g $(OPTIMIZATION) $(INCLUDES) -DTRACE_LEVEL=$(TRACE_LEVEL)
ASFLAGS = -g -mapcs-32
LDFLAGS = -g -v -nostartfiles
OBJCOPYFLAGS = -O binary
OBJDUMPFLAGS = -x --syms -S

all: $(BIN) $(OBJ) $(OUTPUT).out

$(BIN) $(OBJ):
   mkdir $@


$(OUTPUT).out: $(C_OBJECTS) $(ASM_OBJECTS) $(LINKER_SCRIPT)
   @ echo "..linking"
   $(LD) $(LDFLAGS) -Map $(OUTPUT).map -T$(LINKER_SCRIPT) -o $(OUTPUT).out $(C_OBJECTS) $(ASM_OBJECTS) libgcc.a
   $(OBJCOPY) $(OBJCOPYFLAGS) $(OUTPUT).out $(OUTPUT).bin
#   $(OBJDUMP) $(OBJDUMPFLAGS) $(OUTPUT).out > $(OUTPUT).list
   @ echo "...completed."

Best,
Houston

billr

It might help if you posted the Makefile, or at least a portion of it around line 88.

Houston

Part of a code from Makefile, in red there are these colons.
# Flags
CFLAGS = -Wall -fno-common -c -g -mcpu=cortex-m3 -mthumb
CFLAGS += -g $(OPTIMIZATION) $(INCLUDES) -DTRACE_LEVEL=$(TRACE_LEVEL)
ASFLAGS = -g -mapcs-32
LDFLAGS = -g -v -nostartfiles
OBJCOPYFLAGS = -O binary
OBJDUMPFLAGS = -x --syms -S

all: $(BIN) $(OBJ) $(OUTPUT).out

$(BIN) $(OBJ):
   mkdir $@


$(OUTPUT).out: $(C_OBJECTS) $(ASM_OBJECTS) $(LINKER_SCRIPT)
   @ echo "..linking"
   $(LD) $(LDFLAGS) -Map $(OUTPUT).map -T$(LINKER_SCRIPT) -o $(OUTPUT).out $(C_OBJECTS) $(ASM_OBJECTS) libgcc.a
   $(OBJCOPY) $(OBJCOPYFLAGS) $(OUTPUT).out $(OUTPUT).bin
#   $(OBJDUMP) $(OBJDUMPFLAGS) $(OUTPUT).out > $(OUTPUT).list
   @ echo "...completed."

billr

Do you have other software dev tools installed on your computer, besides the Eclipse Helios? I think the problem is that Eclipse is finding the wrong 'make' program. The one being used is a Borland product, probably installed as part of a Borland toolchain. The construct
    $(BIN) $(OBJ):
        do somthing

is a GNU extension and you need GNU make. Look for where GNU make was installed (probably with the Helios stuff) and adjust your PATH environment variable so this directory is before the Borland directory in the list. You may need to logout and back in again for the path change to take effect.

Houston

Thanks, Bill!

Yes, I have RAD Studio, Borland, may be others as well. As I'm not a programmer it is quite difficult for me to understand what I should really change in order to make my board work.
How can I change this path in Eclipse Helios? :-\

billr

Hi Houston,

I'll give you some general direction, but since I don't know which version of Windows you are using or where Eclipse is installed on your computer, the directions may be a little vague in places.

1. Find the various versions on make on your computer. In Windows Explorer, select the C: drive and in the search box, enter "make.exe" and click search or hit the Enter key. Note where the various copies are located. One will be in the Borland tools folder, another someplace else - maybe in a cygwin folder or maybe eclipse or maybe with your arm compiler. Write down that path. Just for example, let's say it was "C:\Program Files\mydir\make.exe".

2. Go to My Computer and select Properties. (In Windows 7 you can click on the Start circle, the right click on Computer and select Properties. In Windows 7, click on "Advanced system settings" in the left side of the window. Select the Advanced tab of the new window. At the bottom of the window, click on Environment Variables. (It's been too long since I've used XP; I don't remember how to get there, but a Google search would probably help you, if you have XP.)

3. In the System variables box, select the "Path" entry and click the Edit button. Click in the Variable value box and press the Home key on the keyboard. Now type in the path to the make program found in step 1, followed by a semi-colon (;) (leave of the make.exe part). For example, if the first part of the path is "C:\Program Files\somefolder;", add your new path in front, so it becomes "C:\Program Files\mydir;C:\Program Files\somefolder;". Click Ok on all the popup windows to save your changes.

4. Reboot your computer.


Houston

Thank you very much, Bill!

Finally, after path changes, you've told me about, my led is blinking   :D ;D
Now I wonder how I can erase the memory in order to stop this blinking :)


P.S.
Shame on the OLIMEX's support team-my 3 last posts haven't got any responses yet!

Best,
Houston

billr

What tools are you using for programming the board? Those tools should have an erase flash function (if that's what you mean by "erase the memory".

Houston

I use Eclipse Helios downloaded via a link stated on the Olimex's website. It has Yagarto embedded tool. ???

billr

In addition to the compiler tools (Eclipse), you need a programming/debug tool - both hardware and software. Something like the Olimex ARM-USB-TINY-H, for example. https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/. Then download and install OpenOCD that will communicate with the JTAG pod and let you erase/program/debug the microcontroller. There are directions on the USB-TINY-H web page referenced above on how to use OpenOCD with Eclipse.

billr

Houston, I see from other threads you started that you already have this installed, along with OpenOCD, so ignore what I said above. You are on the right track. Once you get OpenOCD and JTAG working, you will be able to erase and reprogram the controller.

Houston

Thanks, Bill!

I have arm-usb-tiny as a programming tool. Really, I have a technical problem - where is this "erase button' in Eclipse Helios interface? :o Which icons (View, Tools..or what..)are able to lead me to this button?

billr

I'm afraid I can't answer that one for you, as i'm not using the Eclipse interface. I compile from the command line and talk with OpenOCD via telnet, where I type in "erase" and "write" for programming.