This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Trying to use usb dev pack in msp430f5529lp

Other Parts Discussed in Thread: MSP430-GCC-OPENSOURCE, MSP430F5529

Hi,

I've been wroking for a week (maybe more) trying to be able to use the msp430usbdeveloperspackage_4_10_02 in different ways but I haven't been able, I use mspgcc and I know that ti enginners would say that they don't support this, but any other engineer could help me, I am trying to implement the echo example by datapipe (hid) with msp430-gcc tools. Any one has succeed? Could you tell me what did you do?


By the other hand (addressed to ti engineers) I have been trying to compile the project with the Makefile present in the example folder, but again I haven't been able, I installed the msp430-gcc-opensource, I specified the redhat_gcc path, and I change the $(redhat_gcc)/include_msp430 for $(redhat_gcc)/include:

DEVICE = MSP430F5529
EXAMPLE_NAME = H3_EchoToHost
USB_BASE = ./../../../../..
REDHAT_GCC = ~/ti/gcc
GCC_BIN = $(REDHAT_GCC)/bin
CC = $(GCC_BIN)/msp430-elf-gcc
GDB = $(GCC_BIN)/msp430-elf-gdb
SUPPORT_FILE_DIRECTORY = $(REDHAT_GCC)/include
DRIVERLIB_DIR = $(USB_BASE)/driverlib/MSP430F5xx_6xx
MEMORY_FILE = $(SUPPORT_FILE_DIRECTORY)/$(DEVICE)
PERIPHERAL_FILE = $(SUPPORT_FILE_DIRECTORY)/$(DEVICE)
MSP430_FILE = $(USB_BASE)/USB_API/msp430USB.ld
PROJECT_ROOT = $(USB_BASE)/examples/HID_humanInterface/Datapipe/$(EXAMPLE_NAME)
USB_CONFIG = $(PROJECT_ROOT)/USB_config
USB_API = $(USB_BASE)/USB_API


CFLAGS = -I $(SUPPORT_FILE_DIRECTORY) -I $(USB_BASE) -I $(DRIVERLIB_DIR) -I $(PROJECT_ROOT) -I $(USB_CONFIG) -I $(USB_API) -D__$(DEVICE)__ -mmcu=msp430X -O3 -g -ffunction-sections -fdata-sections -w
LFLAGS = -T $(MEMORY_FILE)/memory.ld -T $(PERIPHERAL_FILE)/peripherals.ld -T $(MSP430_FILE) -Wl,--gc-sections

SRC_FILES = \
../hal.c \
../main.c \
../system_pre_init.c \
../USB_app/usbConstructs.c \
../USB_app/usbEventHandling.c \
../USB_config/descriptors.c \
../USB_config/UsbIsr.c \
../../../../../USB_API/USB_CDC_API/UsbCdc.c \
../../../../../USB_API/USB_Common/usb.c \
../../../../../USB_API/USB_Common/usbdma.c \
../../../../../USB_API/USB_HID_API/UsbHid.c \
../../../../../USB_API/USB_HID_API/UsbHidReq.c \
../../../../../USB_API/USB_MSC_API/UsbMscReq.c \
../../../../../USB_API/USB_MSC_API/UsbMscScsi.c \
../../../../../USB_API/USB_MSC_API/UsbMscStateMachine.c \
../../../../../USB_API/USB_PHDC_API/UsbPHDC.c \
../../../../../driverlib/MSP430F5xx_6xx/adc10_a.c \
../../../../../driverlib/MSP430F5xx_6xx/adc12_a.c \
../../../../../driverlib/MSP430F5xx_6xx/aes.c \
../../../../../driverlib/MSP430F5xx_6xx/bak_batt.c \
../../../../../driverlib/MSP430F5xx_6xx/comp_b.c \
../../../../../driverlib/MSP430F5xx_6xx/crc.c \
../../../../../driverlib/MSP430F5xx_6xx/dac12_a.c \
../../../../../driverlib/MSP430F5xx_6xx/dma.c \
../../../../../driverlib/MSP430F5xx_6xx/eusci_a_spi.c \
../../../../../driverlib/MSP430F5xx_6xx/eusci_a_uart.c \
../../../../../driverlib/MSP430F5xx_6xx/eusci_b_i2c.c \
../../../../../driverlib/MSP430F5xx_6xx/eusci_b_spi.c \
../../../../../driverlib/MSP430F5xx_6xx/eusci_i2c.c \
../../../../../driverlib/MSP430F5xx_6xx/eusci_spi.c \
../../../../../driverlib/MSP430F5xx_6xx/eusci_uart.c \
../../../../../driverlib/MSP430F5xx_6xx/flash.c \
../../../../../driverlib/MSP430F5xx_6xx/gpio.c \
../../../../../driverlib/MSP430F5xx_6xx/ldopwr.c \
../../../../../driverlib/MSP430F5xx_6xx/mpy32.c \
../../../../../driverlib/MSP430F5xx_6xx/pmap.c \
../../../../../driverlib/MSP430F5xx_6xx/pmm.c \
../../../../../driverlib/MSP430F5xx_6xx/ram.c \
../../../../../driverlib/MSP430F5xx_6xx/ref.c \
../../../../../driverlib/MSP430F5xx_6xx/rtc_a.c \
../../../../../driverlib/MSP430F5xx_6xx/rtc_b.c \
../../../../../driverlib/MSP430F5xx_6xx/rtc_c.c \
../../../../../driverlib/MSP430F5xx_6xx/sd24_b.c \
../../../../../driverlib/MSP430F5xx_6xx/sfr.c \
../../../../../driverlib/MSP430F5xx_6xx/sys.c \
../../../../../driverlib/MSP430F5xx_6xx/tec.c \
../../../../../driverlib/MSP430F5xx_6xx/timer_a.c \
../../../../../driverlib/MSP430F5xx_6xx/timer_b.c \
../../../../../driverlib/MSP430F5xx_6xx/timer_d.c \
../../../../../driverlib/MSP430F5xx_6xx/tlv.c \
../../../../../driverlib/MSP430F5xx_6xx/ucs.c \
../../../../../driverlib/MSP430F5xx_6xx/usci_a_spi.c \
../../../../../driverlib/MSP430F5xx_6xx/usci_a_uart.c \
../../../../../driverlib/MSP430F5xx_6xx/usci_b_i2c.c \
../../../../../driverlib/MSP430F5xx_6xx/usci_b_spi.c \
../../../../../driverlib/MSP430F5xx_6xx/usci_i2c.c \
../../../../../driverlib/MSP430F5xx_6xx/usci_spi.c \
../../../../../driverlib/MSP430F5xx_6xx/usci_uart.c \
../../../../../driverlib/MSP430F5xx_6xx/wdt_a.c \
../../../../../driverlib/MSP430F5xx_6xx/deprecated/dma.c \
../../../../../driverlib/MSP430F5xx_6xx/deprecated/flash.c \
../../../../../driverlib/MSP430F5xx_6xx/deprecated/mpy32.c \
../../../../../driverlib/MSP430F5xx_6xx/deprecated/pmm.c \
../../../../../driverlib/MSP430F5xx_6xx/deprecated/ram.c \
../../../../../driverlib/MSP430F5xx_6xx/deprecated/sfr.c \
../../../../../driverlib/MSP430F5xx_6xx/deprecated/sys.c \
../../../../../driverlib/MSP430F5xx_6xx/deprecated/ucs.c \


H3_EchoToHost: $(SRC_FILES)
    $(CC) $(CFLAGS) $(LFLAGS) $? -o $(EXAMPLE_NAME).out

debug: H3_EchoToHost
    $(GDB) $(EXAMPLE_NAME).out

But I got the following error:

/home/daniel/ti/gcc/bin/../lib/gcc/msp430-elf/4.9.1/../../../../msp430-elf/bin/ld: cannot open linker script file /home/daniel/ti/gcc/include/MSP430F5529/memory.ld: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [H3_EchoToHost] Error 1

And that is obiously because it doesn't exist, and I cannot find it, what should I do to compile the example with the msp430-gcc-opensource toolchain

  • Daniel Cardenas said:
    And that is obiously because it doesn't exist, and I cannot find it, what should I do to compile the example with the msp430-gcc-opensource toolchain

    Probably create a .ld file, using the CCS .cmd linker file as a guide.

  • Hello,

    The new release of GCC does not have a memory.ld file or a peripheral.ld file.  So these linker options should be removed and the msp430f5529.ld file included  It is located in the include folder of gcc.

    I have attached the updated version of the H3 example makefile that works for me.  The paths in the file has to be changed according to your installed environment.

    The instructions to compile and load the example to the target via the command line has changed slightly from what was listed in the Examples_Guide_MSP430_USB.pdf document.  For updated instructions please follow the instructions in slau591a.pdf

    Both the instructions for command line and CCS GCC will be updated in the next release of the USB stack.

     

    6283.slau591a[1].zip

    Regards,

    Arthi Bhat

**Attention** This is a public forum