Prev: Heat dissip. series vs. parallel
Next: see URL:
From: Phil Hobbs on 1 Apr 2010 10:23 I got one of those NXP LPCXpresso boards with a Cortex M3 ARM on it, installed the dev tools, and whadda ya know, the demo using the semihosting thing works OK, for printf("Hello, World!") at least. Sooo, now the problem is porting a bunch of fairly simple PIC code over to the ARM, for controlling RC servos etc. Not too radical a job, _except_ that, as always with a new micro, more than half the work is getting the peripheral control registers set up right. Does anybody have a reasonably complete and well-commented (preferably exhaustively commented) Cortex M3 setup routine he could share? That would save me some significant time, since MCU programming isn't my main gig--it's just one of the several zillion things you have to be able to do to get mixed-technology things to work. Thanks Phil Hobbs -- Dr Philip C D Hobbs Principal ElectroOptical Innovations 55 Orchard Rd Briarcliff Manor NY 10510 845-480-2058 hobbs at electrooptical dot net http://electrooptical.net
From: hamilton on 1 Apr 2010 12:21 On 4/1/2010 7:23 AM, Phil Hobbs wrote: > I got one of those NXP LPCXpresso boards with a Cortex M3 ARM on it, > installed the dev tools, and whadda ya know, the demo using the > semihosting thing works OK, for printf("Hello, World!") at least. > > Sooo, now the problem is porting a bunch of fairly simple PIC code Just to be clear, is this PIC assembly ?? over > to the ARM, for controlling RC servos etc. Not too radical a job, > _except_ that, as always with a new micro, more than half the work is > getting the peripheral control registers set up right. > > Does anybody have a reasonably complete and well-commented (preferably > exhaustively commented) Cortex M3 setup routine he could share? That > would save me some significant time, since MCU programming isn't my main > gig--it's just one of the several zillion things you have to be able to > do to get mixed-technology things to work. > > Thanks > > Phil Hobbs > >
From: Nico Coesel on 1 Apr 2010 12:51 Phil Hobbs <pcdhSpamMeSenseless(a)electrooptical.net> wrote: >I got one of those NXP LPCXpresso boards with a Cortex M3 ARM on it, >installed the dev tools, and whadda ya know, the demo using the >semihosting thing works OK, for printf("Hello, World!") at least. > >Sooo, now the problem is porting a bunch of fairly simple PIC code over >to the ARM, for controlling RC servos etc. Not too radical a job, >_except_ that, as always with a new micro, more than half the work is >getting the peripheral control registers set up right. > >Does anybody have a reasonably complete and well-commented (preferably >exhaustively commented) Cortex M3 setup routine he could share? That >would save me some significant time, since MCU programming isn't my main >gig--it's just one of the several zillion things you have to be able to >do to get mixed-technology things to work. Download the examples from NXP's website. These are exhaustive and also work for other compilers than the ones from KEIL. -- Failure does not prove something is impossible, failure simply indicates you are not using the right tools... nico(a)nctdevpuntnl (punt=.) --------------------------------------------------------------
From: linnix on 1 Apr 2010 13:05 On Apr 1, 6:23 am, Phil Hobbs <pcdhSpamMeSensel...(a)electrooptical.net> wrote: > I got one of those NXP LPCXpresso boards with a Cortex M3 ARM on it, > installed the dev tools, and whadda ya know, the demo using the > semihosting thing works OK, for printf("Hello, World!") at least. If you have "Hello, World", then everything is already setup for the boot code. > > Sooo, now the problem is porting a bunch of fairly simple PIC code over > to the ARM, for controlling RC servos etc. Not too radical a job, > _except_ that, as always with a new micro, more than half the work is > getting the peripheral control registers set up right. What else do you need to setup, except for I/Os? For example (for Keil): GPIODirModeSet(GPIO_PORTB_BASE, GPIO_PIN_1, GPIO_DIR_MODE_IN); GPIOPinRead(GPIO_PORTB_BASE, GPIO_PIN_1); GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_1, 0);
From: Phil Hobbs on 1 Apr 2010 13:18
On 4/1/2010 12:21 PM, hamilton wrote: > On 4/1/2010 7:23 AM, Phil Hobbs wrote: >> I got one of those NXP LPCXpresso boards with a Cortex M3 ARM on it, >> installed the dev tools, and whadda ya know, the demo using the >> semihosting thing works OK, for printf("Hello, World!") at least. >> >> Sooo, now the problem is porting a bunch of fairly simple PIC code > > Just to be clear, is this PIC assembly ?? > > > over >> to the ARM, for controlling RC servos etc. Not too radical a job, >> _except_ that, as always with a new micro, more than half the work is >> getting the peripheral control registers set up right. >> >> Does anybody have a reasonably complete and well-commented (preferably >> exhaustively commented) Cortex M3 setup routine he could share? That >> would save me some significant time, since MCU programming isn't my main >> gig--it's just one of the several zillion things you have to be able to >> do to get mixed-technology things to work. >> >> Thanks >> >> Phil Hobbs >> >> > No, it's C written for the Hi-Tech compiler (which is a very nice tool, btw). Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal ElectroOptical Innovations 55 Orchard Rd Briarcliff Manor NY 10510 845-480-2058 hobbs at electrooptical dot net http://electrooptical.net |