Unsuccessful Nano code compilation

Moderators: lily.li, violet, jeremy882, crail.lyu969

User avatar
Kabron
Pre-kindergarten
Pre-kindergarten
Posts: 30
Joined: Sun Dec 20, 2009 6:35 pm
Location: Moscow
Contact:

Unsuccessful Nano code compilation

Post by Kabron » Sun Dec 20, 2009 6:50 pm

I compiled DS0201 source with IAR 5.4 making necessary substitution as:
#define __program_start __iar_program_start.
Build complete OK, but when I try to load hex into RideFlasher I got error message:
"Loading data to non physical address: 0x0".
Really, generated hex file differ with the original one in your source code example. It starts from 0x0.
Any ideas?
Thanks in advance.
Attachments
Nano.jpg
Nano.jpg (12.3 KiB) Viewed 7446 times

vhangell
Pre-kindergarten
Pre-kindergarten
Posts: 16
Joined: Thu Dec 17, 2009 5:54 pm

Re: Unsuccessful Nano code compilation

Post by vhangell » Sun Dec 20, 2009 9:32 pm

Its better to use IAR Arm 4.42A. I believe this is what bure used in compiling the codes.
Also, I use the tool DFU FileManager (from DFuse 3.0) to convert a HEX output from the compiled source. After which, I use DFuSe Demonstration utility to write the firmware to the DSO201 via USB.

edit:
I meant DSO Nano.
DFUSE 3.0 (um0412.zip)
A little google search, and I found this link to EWARM 4.42A

I wish you'll be successful too in your compilation.

User avatar
Kabron
Pre-kindergarten
Pre-kindergarten
Posts: 30
Joined: Sun Dec 20, 2009 6:35 pm
Location: Moscow
Contact:

Re: Unsuccessful Nano code compilation

Post by Kabron » Sun Dec 20, 2009 11:05 pm

I solve with the zero hex start by using STM32F10x_FLASH_offset.icf in linker configuration instead of default one generic_cortex.icf, but now another problem arise when I try to simulate the program.
It's difficult for me 2 use DFUS as I try to clone the application to Primer2 device which is not ready for it.
Also, it's very difficult now to find older version of IAR.
Attachments
Nano1.jpg
Nano1.jpg (17.17 KiB) Viewed 7427 times

vhangell
Pre-kindergarten
Pre-kindergarten
Posts: 16
Joined: Thu Dec 17, 2009 5:54 pm

Re: Unsuccessful Nano code compilation

Post by vhangell » Sun Dec 20, 2009 11:08 pm

You can also try setting the "output converter" in IAR v5.xx to "Output format: Intel extended". Its in the project settings/option.

Ive already posted the links for the old ide.

User avatar
Kabron
Pre-kindergarten
Pre-kindergarten
Posts: 30
Joined: Sun Dec 20, 2009 6:35 pm
Location: Moscow
Contact:

Re: Unsuccessful Nano code compilation

Post by Kabron » Sun Dec 20, 2009 11:17 pm

vhangell wrote:You can also try setting the "output converter" in IAR v5.xx to "Output format: Intel extended". Its in the project settings/option.

Ive already posted the links for the old ide.
O, thanks, I didn't notice that it's a link. I'll instal it.
Yes I use Intelex format but vector allocation problem still exist.

vhangell
Pre-kindergarten
Pre-kindergarten
Posts: 16
Joined: Thu Dec 17, 2009 5:54 pm

Re: Unsuccessful Nano code compilation

Post by vhangell » Sun Dec 20, 2009 11:30 pm

I see, I thought you were also trying on the DSO Nano. Im not sure if using an older IDE will help, since you use it on different hardware and your frimware writing method is a bit different.
Anyways, I think you have to do some modifications in the code if its about the vector base. Most likely its in the file hw_config.h . But unfortunately Im not yet familiar with that.

Reading some post on chinese forums, I found that it is possible to write the firmware aside from the dfuse method. Following the links pointed here. I haven't tested it though since I don't want to mess with the stm bootloader.

User avatar
Kabron
Pre-kindergarten
Pre-kindergarten
Posts: 30
Joined: Sun Dec 20, 2009 6:35 pm
Location: Moscow
Contact:

Re: Unsuccessful Nano code compilation

Post by Kabron » Mon Dec 21, 2009 12:02 am

Hmm.., with 442A everything OK.
Thanks for you attention, vhangell!

vhangell
Pre-kindergarten
Pre-kindergarten
Posts: 16
Joined: Thu Dec 17, 2009 5:54 pm

Re: Unsuccessful Nano code compilation

Post by vhangell » Mon Dec 21, 2009 12:10 am

hmmm, Im glad everything went well for you.
I just hope, seeedstudio will create their own firmware so that the original source will have progress. There are some bugs in the original source.

Icing
Elementary-1
Elementary-1
Posts: 140
Joined: Wed Oct 21, 2009 10:39 pm

Re: Unsuccessful Nano code compilation

Post by Icing » Fri Dec 25, 2009 9:28 am

Try to do changes in stm32f10x_vector.c as follows:

//void __program_start( void ); //this is for IARv4
void __iar_program_start( void );// this if for IARv5


//#pragma location = "INTVEC" // this is for IARv4
#pragma location = ".intvec" // this is for IARv5

/* STM32F10x Vector Table entries */
const intvec_elem __vector_table[] =
{
{ .__ptr = __sfe( "CSTACK" ) },
//__program_start, //this is for IARv4
__iar_program_start, //this is for IARv5

....

I have successfully downloaded the .out.

-Icing

robwrk
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Fri Mar 19, 2010 4:29 am

Re: Unsuccessful Nano code compilation

Post by robwrk » Fri Mar 19, 2010 4:34 am

Hi,

I am using IAR v 4.42A to compile the APP code, but after all the files are compiled I get this error (see bellow). Does anyone know why this happens?
Thank you.
Building configuration: DS0201 - release
Updating build tree...

62 file(s) deleted.
Updating build tree...
Calculate.c
Files.c
Function.c
HW_V1_Config.c
Lcd.c
cortexm3_macro.s
main.c
memory.c
msd.c
scsi_data.c
stm32f10x_flash.c
stm32f10x_gpio.c
stm32f10x_it.c
stm32f10x_lib.c
stm32f10x_nvic.c
stm32f10x_rcc.c
stm32f10x_spi.c
stm32f10x_systick.c
stm32f10x_vector.c
usb_bot.c
usb_core.c
usb_desc.c
usb_endp.c
usb_init.c
usb_int.c
usb_istr.c
usb_mem.c
usb_prop.c
usb_pwr.c
usb_regs.c
usb_scsi.c
Linking
Error[e16]: Segment INTVEC (size: 0xec align: 0x2) is too long for segment definition. At least 0xac more bytes needed. The problem occurred while
processing the segment placement command "-Z(CODE)INTVEC=00-3F", where at the moment of placement the available memory ranges were
"CODE:0-3f"
Reserved ranges relevant to this placement:
0-3f INTVEC

Total number of errors: 1
Total number of warnings: 0

Post Reply