6 years, 1 month ago.

internal error

i am getting an internal error message with no further description, i am clueless of what is wrong, please help, below my code https://ide.mbed.com/compiler/#nav:/example7-3/main.cpp;

/* Set the mbed as a master, and exchange data with a slave sending its own switch positions, and displaying those of the slave */

#include "mbed.h"

SPI ser_port(p11,p12,p13);
DigitalOut red_led(p25);
DigitalOut green_led(p26);
DigitalOut cs(p14);
DigitalIn switch_ip1(p5);
DigitalIn switch_ip2(p6);

char switch_word;
char recd_val;

int main() 
{
	while(1) 
    	{
        	switch_word=0xa0;
		if (switch_ip1==1)
			switch_word=switch_word|0x01;
		if (switch_ip2==1)
			switch_word=switch_word|0x02;
		cs=0;
		recd_val=ser_port.write(switch_word);
		cs=1;
		wait(0.01);
		red_led=0;
		green_led=0;
		recd_val=recd_val&0x03;
		if(recd_val==1)
			red_led=1;
		if(recd_val==2)
			green_led=1;
		if(recd_val==3)
		{
			red_led=1;
			green_led=1;
		}
		
	}
}

Question relating to:

1 Answer

6 years ago.

Hi Franklin,

We reformatted your post to use the code tag as shown in the "Editing tips" to improve it's legibility.

Late last week there were some back-end issues with the Online Compiler but we believe those were resolved before the weekend.

Are you still having issues building your program?

If your project can't afford any downtime, there is an offline tool suite called the Command Line Interface (CLI) that can be used to build Mbed applications. Please visit the following pages for the installer, instructions and tutorial if interested:

The potential drawback to the CLI is that you will then have to migrate your project to gcc or purchase a copy of Keil uVision or DS-5 to use the Arm Compiler. The Online Compiler utilizes the Arm Compiler, but that is not delivered with the CLI as it is a licensed-managed product.

We apologize for the inconvenience.

Regards,

Ralph, Team Mbed

Thank you, everything is back to normal, as you said it was a downtime issue, I can tolerate short time outages, I am happy with the online compiler, it’s easier than Keil

posted by franklin viloria 27 Nov 2018