Jump to content

error compiling STM32 bootloader


ilmenator
 Share

Recommended Posts

I've been trying to compile the bootloader for STM32 core, as I have a "virgin" chip and want to program it via ROM based UART Bootloader as described here. I have done this before, but for some reason the compile action fails. "Normal" code compilation works, but with the bootloader I get the following error message:

CD: C:\mios32\trunk\bootloader\src\

Current directory: C:\mios32\trunk\bootloader\src

make

Process started >>>

make -f Makefile.bsl_MBHP_CORE_STM32 cleanall

make[1]: Entering directory `/c/mios32/trunk/bootloader/src'

rm -rf project_build

rm -f project.hex

make[1]: Leaving directory `/c/mios32/trunk/bootloader/src'

make -f Makefile.bsl_MBHP_CORE_STM32

make[1]: Entering directory `/c/mios32/trunk/bootloader/src'

rm -f project.hex

Creating object file for startup_stm32f10x_hd.c

Creating object file for main.c

Creating object file for bsl_sysex.c

bsl_sysex.c: In function 'BSL_SYSEX_Cmd_WriteMem':

bsl_sysex.c:293: warning: suggest parentheses around assignment used as truth value

Creating object file for mios32_srio.c

Creating object file for mios32_din.c

Creating object file for mios32_dout.c

Creating object file for mios32_enc.c

Creating object file for mios32_lcd.c

Creating object file for mios32_midi.c

c:/mios32/trunk/mios32/common/mios32_midi.c: In function 'MIOS32_MIDI_SYSEX_Cmd':

c:/mios32/trunk/mios32/common/mios32_midi.c:1479: warning: implicit declaration of function 'BSL_SYSEX_Cmd'

c:/mios32/trunk/mios32/common/mios32_midi.c: In function 'MIOS32_MIDI_SYSEX_Cmd_Query':

c:/mios32/trunk/mios32/common/mios32_midi.c:1562: warning: implicit declaration of function 'BSL_SYSEX_ReleaseHaltState'

Creating object file for mios32_osc.c

Creating object file for mios32_com.c

Creating object file for mios32_uart_midi.c

Creating object file for mios32_iic_midi.c

Creating object file for mios32_iic_bs.c

Creating object file for mios32_mf.c

Creating object file for mios32_sdcard.c

Creating object file for mios32_enc28j60.c

Creating object file for mios32_bsl.c

Creating object file for mios32_sys.c

Creating object file for mios32_irq.c

Creating object file for mios32_spi.c

Creating object file for mios32_i2s.c

Creating object file for mios32_board.c

Creating object file for mios32_timer.c

Creating object file for mios32_stopwatch.c

Creating object file for mios32_delay.c

Creating object file for mios32_ain.c

Creating object file for mios32_usb.c

Creating object file for mios32_usb_midi.c

Creating object file for mios32_usb_com.c

Creating object file for mios32_uart.c

Creating object file for mios32_iic.c

Creating object file for printf-stdarg.c

Creating object file for stm32f10x_gpio.c

Creating object file for stm32f10x_flash.c

Creating object file for stm32f10x_adc.c

Creating object file for stm32f10x_dac.c

Creating object file for stm32f10x_spi.c

Creating object file for stm32f10x_usart.c

Creating object file for stm32f10x_i2c.c

Creating object file for stm32f10x_dma.c

Creating object file for stm32f10x_tim.c

Creating object file for stm32f10x_rcc.c

Creating object file for stm32f10x_rtc.c

Creating object file for stm32f10x_bkp.c

Creating object file for stm32f10x_pwr.c

Creating object file for misc.c

Creating object file for core_cm3.c

Creating object file for usb_core.c

Creating object file for usb_int.c

Creating object file for usb_mem.c

Creating object file for usb_regs.c

Creating object file for otgd_fs_cal.c

Creating object file for otgd_fs_dev.c

Creating object file for otgd_fs_int.c

Creating object file for otgd_fs_pcd.c

c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/bin/ld.exe: project_build/project.elf section `.text' will not fit in region `FLASH'

c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 848 bytes

collect2: ld returned 1 exit status

make[1]: *** [project_build/project.elf] Error 1

make[1]: Leaving directory `/c/mios32/trunk/bootloader/src'

make: *** [MBHP_CORE_STM32] Error 2

<<< Process finished.

================ READY ================

I have not changed anything in the code itself, it is what is in the repository under \mios32\trunk\bootloader\src

Thanks for looking, ilmenator

Edited by ilmenator
Link to comment
Share on other sites

Looking into the neighboring folder, \mios32\trunk\bootloader\updater, I found the update which compiles fine and seems to be ok to use on a virgin STM32, according to the readme. I can flash the bootloader okay, and afterwards the two MIDI ports work okay.

Unfortunately, there is something wrong with the USB port. Windows 7 does not recognize the device and fails to install proper drivers. This is on an STM32_V2 board, and I am wondering if this is somehow related to R3 which I could not stuff, as I could not find any info on this. It is located next to J27, the boot jumper, and as I could not find any info on it I left it open.

Edited by ilmenator
Link to comment
Share on other sites

Hi.

Not sure about the second problem but they may both be related. I guess that you are using the latest CodeSourcery toolchain? There seem to have been various changes which cause the memory overflow error. Either use an older (2009) version of their toolchain or download the MIDIbox one. Instructions are =mios32&s[]=toolchain]here

Cheers

Phil

Link to comment
Share on other sites

I'm also not sure about the second problem, but to the bootloader: you don't need to compile it by yourself, as a precompiled binary (0x0000..0x3eff) is always part of any MIOS application build, because it's added in http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fmios32%2FSTM32F10x%2Fmios32_bsl.c

In other words: flash any MIOS32 application via JTAG or UART, this will install the bootloader as well! :)

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...