Author Topic: Compiler/IDE for programming ATMega103 MCU using JTAG programmer  (Read 1601 times)

0 Members and 1 Guest are viewing this topic.

Offline FlyingDutchTopic starter

  • Regular Contributor
  • *
  • Posts: 144
  • Country: pl
Hello,

I implemented AVR soft-core (ATMega103) based on project form opencores.org - here is link to this project:

https://opencores.org/projects/avr_core

I implemented it for Artix7 FPGA, exactly for Digilent "Cmod A7" board:

https://reference.digilentinc.com/reference/programmable-logic/cmod-a7/start?redirect=1id=cmod_a7/cm

Currently I haven't any implementastion issues. I am looking for Compiler/IDE in which I will be able to program this soft-cpu using JTAG programmer (this soft-proceessor has built-in JTAG programming intefrface). I am looking for example for board description for Arduino IDE allowing prograsmming ATMega103 AVR MCU. I tried also "Atmel Studio" (versins 7 and 6),b ut there are no programming target ATMega103.

Could somebody give mi e hint when I can find compiler allowing programming of ATMeg103 AVR MCU?

Thanks in advance and Regards
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Compiler/IDE for programming ATMega103 MCU using JTAG programmer
« Reply #1 on: January 19, 2020, 12:33:16 pm »
Could somebody give mi e hint when I can find compiler allowing programming of ATMeg103 AVR MCU?

That chip is so obsolete... you will struggle to find anything to support it. You can probably still compile code for it with gcc, but forget about any IDE or JTAG support. Your only option there is to roll your own device support.

Bob
"All you said is just a bunch of opinions."
 
The following users thanked this post: FlyingDutch

Online mikerj

  • Super Contributor
  • ***
  • Posts: 3272
  • Country: gb
Re: Compiler/IDE for programming ATMega103 MCU using JTAG programmer
« Reply #2 on: January 19, 2020, 12:53:13 pm »
Atmel Studio is the manufacturers development tool which includes an IDE, debugging and programming support and (in the later versions) also the GCC compiler.

However the Mega103 is a very old, discontinued part and I don't think it is supported by later versions of Studio.  If not you can install an older version e.g. Studio 4 which does support this device, but does not include a compiler so you will need to download and install WinAVR. Despite being an ancient version of Studio I have had this running ok on 64bit Windows.  Note that the code editor in this version is terrible by modern standards, but you are obviously free to use whatever editor you wish outside the IDE.

Alternatively the Mega128 is a very similar device to the Mega103, and the 128 is definitely supported in later versions of Studio.  The 128 includes configuration fuses to make it behave like the 103, so it may be possible to compile code as a 128 whilst paying careful attention to the differences between the parts.
 
The following users thanked this post: FlyingDutch

Offline FlyingDutchTopic starter

  • Regular Contributor
  • *
  • Posts: 144
  • Country: pl
Re: Compiler/IDE for programming ATMega103 MCU using JTAG programmer
« Reply #3 on: January 19, 2020, 02:35:31 pm »
Hello,

I will first try Atmel Studio 4 with WinAVR compiler, then also try programming this soft-processor as ATMega128 in newer compiler.

Thanks for all hints  :)

Regards
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9902
  • Country: us
Re: Compiler/IDE for programming ATMega103 MCU using JTAG programmer
« Reply #4 on: January 19, 2020, 05:13:49 pm »
Some years back, when I was playing with the ATmega128, I was using Linux.  I had installed avr-gcc, avr-libc and avr-dude (the programmer) and all I used for the IDE was 'gedit'.  A simple Makefile had targets for 'make all', 'make program' and 'make clean'.  For larger projects, dependencies can also be automated with 'make depend'.

All of those tools already exist in the Arduino directories.  I haven't tried it but I suppose you could use the Arduino IDE and none of the Arduino specific libraries.

Or, you can spend the time to install Eclipse.  Microsoft Visual Studio will probably work and, as just an IDE, Visual Code works pretty nice.  There may be a plug-in to allow programming, there are a lot of plug-ins for Visual Code and Eclipse.  If not, keep a console open and just use avr-dude directly (probably through a batch file so you don't have to keep typing all the options).

I have't used Visual Studio for ATmega projects in a long time but it used to work well.  I was adding switches, knobs and dials to Microsoft Flight Simulator using the Windows SDK and the tools for an ATmega <something> all in the same session.  I could compile and test the C++ code for the PC and compile/program the ATmega code all from the same IDE.  No, I don't remember how I set that up but it worked well.



 
The following users thanked this post: FlyingDutch

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9902
  • Country: us
Re: Compiler/IDE for programming ATMega103 MCU using JTAG programmer
« Reply #5 on: January 19, 2020, 05:15:26 pm »
Alternatively the Mega128 is a very similar device to the Mega103, and the 128 is definitely supported in later versions of Studio.  The 128 includes configuration fuses to make it behave like the 103, so it may be possible to compile code as a 128 whilst paying careful attention to the differences between the parts.

The 128 is a great chip!  It has decent performance, plenty of memory and, more important, lots of pins.  It is my favorite ATmega device.
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Compiler/IDE for programming ATMega103 MCU using JTAG programmer
« Reply #6 on: January 19, 2020, 05:34:16 pm »

I will first try Atmel Studio 4 with WinAVR compiler, then also try programming this soft-processor as ATMega128 in newer compiler.


How are you planning to program it, given the original Atmel103 had no support for JTAG? Does the soft core support SPI programming? If so you might be able dig out some ancient programmers like STK500.
Bob
"All you said is just a bunch of opinions."
 
The following users thanked this post: FlyingDutch

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1852
  • Country: ch
Re: Compiler/IDE for programming ATMega103 MCU using JTAG programmer
« Reply #7 on: January 19, 2020, 05:37:10 pm »
Would be interesting to upgrade the FPGA design to an atmega128 :)
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4219
  • Country: us
Re: Compiler/IDE for programming ATMega103 MCU using JTAG programmer
« Reply #8 on: January 20, 2020, 02:20:42 am »
Atmega128a is theoretically backward-compatible with ATmega103 - it even has 103 compatibility mode (about which there are app-notes.)
So you can probably fire up a current AS7 and tell it you're using the 128a, as far as getting the right code and peripherals (being careful to only use the peripherals present on a 103, of course.)
The original 103 didn't have JTAG (nor any other debugging capabilities, that I can see.)  With luck, your implementation might be compatible with the 128 JTAG.  Or you can set up AS to use an "external tool" for the programming (perhaps some OpenOCD-based script.)
 
The following users thanked this post: FlyingDutch

Offline FlyingDutchTopic starter

  • Regular Contributor
  • *
  • Posts: 144
  • Country: pl
Re: Compiler/IDE for programming ATMega103 MCU using JTAG programmer
« Reply #9 on: January 20, 2020, 09:23:05 am »
Would be interesting to upgrade the FPGA design to an atmega128 :)

Hi, yes but it is beyond my skills  ;)

Regards
 

Offline FlyingDutchTopic starter

  • Regular Contributor
  • *
  • Posts: 144
  • Country: pl
Re: Compiler/IDE for programming ATMega103 MCU using JTAG programmer
« Reply #10 on: January 20, 2020, 09:26:02 am »
Atmega128a is theoretically backward-compatible with ATmega103 - it even has 103 compatibility mode (about which there are app-notes.)
So you can probably fire up a current AS7 and tell it you're using the 128a, as far as getting the right code and peripherals (being careful to only use the peripherals present on a 103, of course.)
The original 103 didn't have JTAG (nor any other debugging capabilities, that I can see.)  With luck, your implementation might be compatible with the 128 JTAG.  Or you can set up AS to use an "external tool" for the programming (perhaps some OpenOCD-based script.)

HI, thanks for clarification, I will try program this soft-cpu as ATMega128. If I have any results I write them in tis post.

Regards
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf