Jump to content
Sign in to follow this  
larsie

Compiler updated to gcc version 4.5.3

Recommended Posts

I have now updated the Inventortown compiler to gcc version 4.5.3. This means that you can make projects for more microcontroller versions. Not all the supported ones are shown in the list, so if you have one you want me to include, post a message here.

 

GCC is installed according to these instructions: https://github.com/sergiocampama/Launch ... /README.md (thanks Sergio, I owe you a beer). The system is using Make at the moment, but I may change to rake instead as Sergio suggests.

 

Unfortunately you may need to change your code slightly to support the new GCC version.

 

1. You first have to re-select your micro-controller version in the project-settings, since the names have changed.

 

2. Your header files should now include instead of .

 

3. Your header files should not include to do interrupts any more. Instead you need to define your interrupts, for example like this (thanks to Sergio again):

 

#define interrupt(x) void __attribute__((interrupt (x)))

... later in the file ...

//Port 1 interrupt, which toggles the LEDs
interrupt(PORT1_VECTOR) PORT1_ISR() {

if (BUTTON & BUTTON_IFG)
{
	LED_OUT ^= LED_GREEN + LED_RED;
	BUTTON_IFG &= ~BUTTON;
}

}

 

Sergio has some more example code here: https://github.com/sergiocampama/Launchpad/

 

These changes haven't been done yet in my code. I will migrate ASAP. Please report here if you have issues.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...