Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'addr too high' ERROR - maybe CCM? stm32f407 #239

Closed
rusefi opened this issue May 28, 2014 · 4 comments
Closed

'addr too high' ERROR - maybe CCM? stm32f407 #239

rusefi opened this issue May 28, 2014 · 4 comments

Comments

@rusefi
Copy link

rusefi commented May 28, 2014

We are failing to program our .hex file using stlink. Same .hex file works OK if flashed using the official "st link utility" on Windows. The only thing maybe special about our hex file is that we are using CCM memory region - we've tried and it seem to work if CCM is not used.

The failing to flash binary is available at http://rusefi.com/build_server/rusefi_firmware.zip

the error message is:
build red$ ~/Development/embedded/tools/stlink/st-flash write rusefi.bin 0x08000000
2014-05-28T16:45:48 INFO src/stlink-usb.c: -- exit_dfu_mode
2014-05-28T16:45:48 INFO src/stlink-common.c: Loading device parameters....
2014-05-28T16:45:48 INFO src/stlink-common.c: Device connected is: F4 device, id 0x10016413
2014-05-28T16:45:48 INFO src/stlink-common.c: SRAM size: 0x30000 bytes (192 KiB), Flash: 0x100000 bytes (1024 KiB) in pages of 16384 bytes
2014-05-28T16:45:50 INFO src/stlink-common.c: Attempting to write 134241388 (0x8005c6c) bytes to stm32 address: 134217728 (0x8000000)
2014-05-28T16:45:50 ERROR src/stlink-common.c: addr too high
stlink_fwrite_flash() == -1

We've tried some older source codes and current version from today (May 28, 2014)

@prattmic
Copy link
Contributor

Well, it says you are attempting to write 134MB, which surely won't fit on the flash. Are you sure the binary is not malformed?

@rusefi
Copy link
Author

rusefi commented May 28, 2014

I think you have a point here, it very well could be that the problem is with the .bin file

Somehow our 500K hex file produces a 130M BIN file, the command we are using is
arm-none-eabi-objcopy -I ihex -O binary rusefi.hex rusefi.bin

This gets us to #110 and #157 :)

@prattmic
Copy link
Contributor

I have had similar issues previously creating bin files from ELF files,
using objcopy.

I don't recall exactly what the issue was, but I believe my text section
was malformed, technically beginning at 0x0, but not having any code until
0x8000000.
On May 28, 2014 8:23 AM, "rusefi" notifications@github.com wrote:

I think you have a point here, it very well could be that the problem is
with the .bin file

Somehow our 500K hex file produces a 130M BIN file, the command we are
using is
arm-none-eabi-objcopy -I ihex -O binary rusefi.hex rusefi.bin

This gets us to #110 #110 and
#157 #157 :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/239#issuecomment-44421220
.

@rusefi
Copy link
Author

rusefi commented May 28, 2014

It looks like we have found the problem - it was in the .ld linked script, CCM section did not have 'noload' and this was causing the huge .bin file

Once we've changed it to '.ccm (NOLOAD) :' things got better. This ticket should be aborted - it's not a stlink issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants