avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] SPM Problem


From: Tom Maughan
Subject: [avr-gcc-list] SPM Problem
Date: Sat, 20 Dec 2003 22:52:06 +0000

I've got an odd problem. I'm porting some code from IAR to GCC and have hit a brick wall.

All the C works BUT we have some assembler to reprogram the internal flash. With the IAR it works just fine, with the GCC it hangs the moment it executes the SPM instruction after loading the SPMCR with 0x03 (erase).

The code is the same, its locating it in the correct place (1F800), its calling it correcly, its just not working.

We have alot of other assembly routines that work correctly.

I've replaced the IAR 'DW' with '.word' but I have not changed the parameter register numbers. The programming sequence is entirely assembly and is called by void program_flash(void) and then each assembler function sets the correct registers before calling the next so I cannot see how changing from R18 etc.. to R24 etc.. would make a difference.

Anyone else had issues with SPM?

Many thanks!

--

 _______
|_     _|-----.--------.   tom[at]tmaughan[.]co[.]uk
  |   |    _  |        |   tpm195[at]zepler[.]net
  |___|  _____|__|__|__|   http://www.tmaughan.co.uk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]