Re: [Sdcc-user] getting started with C8051

2016-09-01 Thread Benjamin Larsson
>> I was surprised to see an .ihx file mentioned. >> When I download my software to the boards, I always download the >> .omf file. >> If you get an ".omf" file from your build, you might want to try that >> file for download. >> >> BR >> Joakim > > Good point. When only linking in another module (

Re: [Sdcc-user] getting started with C8051

2016-08-30 Thread Maarten Brock
> > On 2016-08-29 22:30, Philipp Klaus Krause wrote: >> On 29.08.2016 00:20, Benjamin Larsson wrote: >>> On 08/28/2016 11:30 PM, Philipp Klaus Krause wrote: On 28.08.2016 23:13, Benjamin Larsson wrote: > On 08/28/2016 11:03 PM, Philipp Klaus Krause wrote: >> Dear Benjamin, >> >

Re: [Sdcc-user] getting started with C8051

2016-08-29 Thread Joakim Langlet
On 2016-08-29 22:30, Philipp Klaus Krause wrote: > On 29.08.2016 00:20, Benjamin Larsson wrote: >> On 08/28/2016 11:30 PM, Philipp Klaus Krause wrote: >>> On 28.08.2016 23:13, Benjamin Larsson wrote: On 08/28/2016 11:03 PM, Philipp Klaus Krause wrote: > Dear Benjamin, > > what too

Re: [Sdcc-user] getting started with C8051

2016-08-29 Thread Philipp Klaus Krause
On 29.08.2016 00:20, Benjamin Larsson wrote: > On 08/28/2016 11:30 PM, Philipp Klaus Krause wrote: >> On 28.08.2016 23:13, Benjamin Larsson wrote: >>> On 08/28/2016 11:03 PM, Philipp Klaus Krause wrote: Dear Benjamin, what tool are you using to write your program onto the board?

Re: [Sdcc-user] getting started with C8051

2016-08-28 Thread Benjamin Larsson
On 08/28/2016 11:30 PM, Philipp Klaus Krause wrote: > On 28.08.2016 23:13, Benjamin Larsson wrote: >> On 08/28/2016 11:03 PM, Philipp Klaus Krause wrote: >>> Dear Benjamin, >>> >>> what tool are you using to write your program onto the board? >>> >>> Philipp >> >> >> Under windows I use simplicity

Re: [Sdcc-user] getting started with C8051

2016-08-28 Thread Benjamin Larsson
On 08/28/2016 11:00 PM, Philipp Klaus Krause wrote: > Wondering how printf("") might cause problems, I looked at the executed > code in printf_large. Basically it should just do a read from the > pointer, see that we are at the end of the string and return. > > So I found the read from a pointer is

Re: [Sdcc-user] getting started with C8051

2016-08-28 Thread Philipp Klaus Krause
On 28.08.2016 23:13, Benjamin Larsson wrote: > On 08/28/2016 11:03 PM, Philipp Klaus Krause wrote: >> Dear Benjamin, >> >> what tool are you using to write your program onto the board? >> >> Philipp > > > Under windows I use simplicity studio with a UC6 device. Under linux I > use ec2-new from h

Re: [Sdcc-user] getting started with C8051

2016-08-28 Thread Benjamin Larsson
On 08/28/2016 11:03 PM, Philipp Klaus Krause wrote: > Dear Benjamin, > > what tool are you using to write your program onto the board? > > Philipp Under windows I use simplicity studio with a UC6 device. Under linux I use ec2-new from https://github.com/paragonRobotics/ec2-new with the same dev

Re: [Sdcc-user] getting started with C8051

2016-08-28 Thread Philipp Klaus Krause
Dear Benjamin, what tool are you using to write your program onto the board? Philipp -- ___ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.ne

Re: [Sdcc-user] getting started with C8051

2016-08-28 Thread Philipp Klaus Krause
Wondering how printf("") might cause problems, I looked at the executed code in printf_large. Basically it should just do a read from the pointer, see that we are at the end of the string and return. So I found the read from a pointer is the problem. Placing a read from a generic pointer in main()

Re: [Sdcc-user] getting started with C8051

2016-08-28 Thread Philipp Klaus Krause
On 28.08.2016 21:44, Philipp Klaus Krause wrote: > On 28.08.2016 15:05, Benjamin Larsson wrote: >> Hi. >> >>> >>> I have serial output on the C8051F330 board RDM6300 working via >>> putchar() (see attached code). But whenever I try to use printf(), >>> everything gets messed up: Garbage output on t

Re: [Sdcc-user] getting started with C8051

2016-08-28 Thread Philipp Klaus Krause
On 28.08.2016 15:05, Benjamin Larsson wrote: > Hi. > >> >> I have serial output on the C8051F330 board RDM6300 working via >> putchar() (see attached code). But whenever I try to use printf(), >> everything gets messed up: Garbage output on the serial line or the >> device resets. > > That is exa

Re: [Sdcc-user] getting started with C8051

2016-08-28 Thread Maarten Brock
> Hi. > >> >> I have serial output on the C8051F330 board RDM6300 working via >> putchar() (see attached code). But whenever I try to use printf(), >> everything gets messed up: Garbage output on the serial line or the >> device resets. > > That is exactly the same behaviour I got on the F330. My c

Re: [Sdcc-user] getting started with C8051

2016-08-28 Thread Benjamin Larsson
Hi. > > I have serial output on the C8051F330 board RDM6300 working via > putchar() (see attached code). But whenever I try to use printf(), > everything gets messed up: Garbage output on the serial line or the > device resets. That is exactly the same behaviour I got on the F330. My code is a me

Re: [Sdcc-user] getting started with C8051

2016-08-28 Thread Philipp Klaus Krause
On 19.08.2016 23:11, benja...@southpole.se wrote: > Hi, I created some small examples for the C8051F*** > > https://github.com/merbanan/C8051F300_examples > > I tried these examples on a F340 but something doesnt work correctly when > I send data over the serial port and sdcc. If I use Keil it wo

Re: [Sdcc-user] getting started with C8051

2016-08-22 Thread Maarten Brock
> >> Hello Benjamin, >> >> Using a delay loop counting a non-volatile variable is asking for >> trouble. >> This code has no side effects and can be completely removed by compiler >> optimizations. And with an F340 running twice as fast as as an F300 the >> delay won't be the same either. >> >> A p

Re: [Sdcc-user] getting started with C8051

2016-08-21 Thread benjamin
> Hello Benjamin, > > Using a delay loop counting a non-volatile variable is asking for trouble. > This code has no side effects and can be completely removed by compiler > optimizations. And with an F340 running twice as fast as as an F300 the > delay won't be the same either. > > A proper soluti

Re: [Sdcc-user] getting started with C8051

2016-08-20 Thread Philipp Klaus Krause
On 19.08.2016 21:54, Maarten Brock wrote: > > Something that every SiLabs C8051Fxxx user bumps into as the first issue > is that the watchdog is enabled by default at shortest interval and that > our crt routines take longer than this interval. […] Thanks for the help with this and the previous i

Re: [Sdcc-user] getting started with C8051

2016-08-19 Thread Maarten Brock
>> I'm just trying to write my first C8051 program: >> >> __sfr __at(0xa0) P2; >> __sfr __at(0xa6) P2MDOUT; >> __sfr __at(0xe2) XBR1; >> >> unsigned long int u = 0; >> #define u 0ul >> >> void main(void) >> { >> // Enable port output >> XBR1 = 0x40; >> P2MDOUT = 0x0c; >> >> for(

Re: [Sdcc-user] getting started with C8051

2016-08-19 Thread benjamin
> I'm just trying to write my first C8051 program: > > __sfr __at(0xa0) P2; > __sfr __at(0xa6) P2MDOUT; > __sfr __at(0xe2) XBR1; > > unsigned long int u = 0; > #define u 0ul > > void main(void) > { > // Enable port output > XBR1 = 0x40; > P2MDOUT = 0x0c; > > for(;;) >

Re: [Sdcc-user] getting started with C8051

2016-08-19 Thread Maarten Brock
> I'm just trying to write my first C8051 program: > > __sfr __at(0xa0) P2; > __sfr __at(0xa6) P2MDOUT; > __sfr __at(0xe2) XBR1; > > unsigned long int u = 0; > #define u 0ul > > void main(void) > { > // Enable port output > XBR1 = 0x40; > P2MDOUT = 0x0c; > > for(;;) >

[Sdcc-user] getting started with C8051

2016-08-19 Thread Philipp Klaus Krause
I'm just trying to write my first C8051 program: __sfr __at(0xa0) P2; __sfr __at(0xa6) P2MDOUT; __sfr __at(0xe2) XBR1; unsigned long int u = 0; #define u 0ul void main(void) { // Enable port output XBR1 = 0x40; P2MDOUT = 0x0c; for(;;) P2 = ((u / 1