Syntax Highlighting in AStudio Editor

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

Hi freaks,

sure a small annoyance, but maybe someone knows a simple fix:
Since I'm working with al lot of different controllers, I like to name the various assembler source files after the processor they are written for: *.avr for AVRs, *.m43 for MSP430, *.cf for ColdFire etc. etc.

Unfortunately almost all manufacturer driven/sponsored tools want their assembler sources with the ending *.asm. This is very confusing when working with several µCs at a time.

AStudio has the same (mis-)behaviour. In order to have the syntax highlighting work, asm sources have to have the extension ASM.

Is there any way to configure AStudio (or its editor) to (also?) accept an extension of AVR?

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

Can you put your processor type befor the .asm? i.e. myfile avr.asm

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Yes, I could do that in order to distinguish the files for me. But I would still not be able to connect the various assembler tools with the right source files since they would still all be *.ASM files. And my favourite editor(Ultraedit32) derives the systax highliting from the file extension too.

*.asm is simply too unspecific...

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

It may exist in the registry as a setting, but more than likely you would need to use a hex editor, and modify the executable itself. I know it's probably not the answer you're looking for, but this is the unfortunate circumstance when values are hard-coded into applications.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

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

...that would be the last ressort.

I still hope for some AStudio programmer to jump in and point to/unveil some (undocumented?) feature to configure the tool... :-)

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

Unfortunately the filetypes are hard embedded in the code of Studio .However there is a kind of way around, if you name your files with somthing that begins with asm in the filetype the syntaxcoloring remains, like myprog.asmavr.
We note the wish for a user defined filetype.

The coloring is controlled form the file C:\Program Files\Atmel\AVR Tools\AvrStudio4\edit\AvrStudio_asm.ini. (assuming defalt folder)
Have a look at http://www.roguewave.com/support... and Select Objective Edit if you want to know more on this file.

lars k
studio dev team
atmel norway

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

Hello Lars,

thanks a lot!

The trick with ASMAVR works. I changed the "Wordfile.txt" of UltraEdit32 to also trigger on "ASMAVR" and now both editors recognize and highlight AVR assembler sources correctly. (To have a way to configure the tool in future versions would be nice anyway)

Happy,
Stefan
:D