BLDC controller

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I am designing BLDC controller taking Application note AVR444. The provided code is for IAR compiler. I use AVR GCC.

Any one ever ported it to GCC? if so please help in this regard.

Or any one can give me the hex of the code, so that i can simulate it which will be helpful for me in development.

Nandhu

Last Edited: Sat. Jul 1, 2017 - 03:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hai

somehow i managed to compile AN 444 in IAR, but i cant generate hex file.

If i select intel-standard output format i get this error

Error[e133]: The output format intel-standard cannot handle multiple address spaces. Use format variants (-y -O) to specify which address space is wanted

Can any body help me to clear this error?

Nandhu

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can you successfully edit/compile/burn/run any other simple avr program? Like make an led go on and off at a designed freq and duty cycle? If so, this proves your program development chain is working.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The multiple address spaces are flash and EEPROM. Are you initializing the EEPROM in your code?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try reading the thread below. It has an attached text file with tips, and lots of tips posted as comments on the thread.

Porting code from IAR to Avr-GCC

Stu

Engineering seems to boil down to: Cheap. Fast. Good. Choose two. Sometimes choose only one.

Newbie? Be sure to read the thread Newbie? Start here!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks to everyone

to bobgardner

i am able succeed in compilation without generation of hex. i.e. i am able to generate and simulate it in avr studio. But i can't create an hex file

to rneil
yes i am intializing eeprom.

stu_san
Thanks for pointing out the topic, which i missed while searching.

Still cant able to generate hex. I am new to IAR

Nandhu

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Surely there is something in the makefile about output file type. Might be as simple as removing the comment symbol?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nandhu015, did you ever found a solution to the problem? Because I have the same problem.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To generate a hex-file put this under Options>Linker>Extra options

-Ointel-extended,(CODE)=C:\whatever\code88.hex
-Ointel-extended,(XDATA)=C:\whatever\eep88.hex

and compile

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am having the same issue, however the answer lhogberg gave did not help me any further.

I still have this error:
Error[e133]: The output format intel-standard cannot handle multiple address spaces. Use format variants (-y -O) to specify which address space is wanted

help?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

SER

I have use your indication and the compiler work OK.

but i have a strage problem :the pwm output is 2KHZ ISTEAD OF 20KHZ LIKE IS INDICATED ON AVR444 NOTE .

CAN SAMOBODY HELP ME ? WOTH CAN I DO?

THANK YOU 

vandi

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Vandi.

 

You do realise that you are replying to a post that is 8 years old. "lhogberg" has never returned here after that post.

Ross McKenzie ValuSoft Melbourne Australia

Topic locked