Simplecortex: LPC1769 Arduino Format

General discussions about working with the Astrobe IDE and programming ARM Cortex-M0, M3, M4 and M7 microcontrollers.
Post Reply
Oberoid
Posts: 18
Joined: Fri Jan 28, 2011 8:57 pm
Location: Amsterdam, Netherlands

Simplecortex: LPC1769 Arduino Format

Post by Oberoid » Fri Jan 25, 2013 11:02 pm

I'm tring to run this board http://www.brc-electronics.nl with Astrobe.

It looks like it has an interface similar to the lpcXpresso. Actually it is designed by an intern at NXP so some resemblance is probably not a coincidence.
I want to use this board at my school. We have some arduino's for science projects.
With this board I can research which language is the better for learning embedded programming - arduino or Oberon.


Greets,
F.P.

Oberoid
Posts: 18
Joined: Fri Jan 28, 2011 8:57 pm
Location: Amsterdam, Netherlands

Re: Simplecortex: LPC1769 Arduino Format

Post by Oberoid » Sat Jan 26, 2013 10:49 am

Blink an oberonLed works with the simpleCortex board.

I used the following settings:

Cooxox Cortex Flash programmer
settings in Config tab:
  • Adapter -> ColinkEx
    MaxClocK-> 1Mhz

Astrobe M3
settings in Link Options tab:
  • Target: LPC1769
    Crystal Freq (Hz): 12000000
    Heap Start: 00000000H
    Heap Limit: 00000007H
(Not shure if the Heap Start/Limit value's are correct)

The blinker code is adapted from the CBF example for the Olimex boards.

Code: Select all

MODULE Blinker;
IMPORT Main, MCU, SYSTEM, Timer;

PROCEDURE Run();
CONST
  (* led connected to pin P1.25 *)
  ledBit = {25};
VAR
  select, direction: SET;
BEGIN

  (* Set led pin as output by setting the direction bit *)
  SYSTEM.GET(MCU.FIO1DIR, direction);
  SYSTEM.PUT(MCU.FIO1DIR, direction + ledBit);
  
  WHILE TRUE DO
    SYSTEM.PUT(MCU.FIO1CLR, ledBit);
    Timer.MSecDelay(500);
    SYSTEM.PUT(MCU.FIO1SET, ledBit);
    Timer.MSecDelay(500)
  END
END Run;

BEGIN
  Run()
END Blinker.

cfbsoftware
Site Admin
Posts: 525
Joined: Fri Dec 31, 2010 12:30 pm
Contact:

Re: Simplecortex: LPC1769 Arduino Format

Post by cfbsoftware » Sat Jan 26, 2013 11:30 pm

Good news! I would have been surprised if it didn't work - you should be able to use Astrobe for Cortex M3 to target just about any board that uses one of the NXP LPC1xxx MCUs that are supported by Astrobe for Cortex-M3.

The only situation I can think of where you might have difficulties with an unsupported LPC176x board is if the board used a proprietary means to upload software and prohibited the normal bootloader access to any part of FLASH ROM via UART0.

cfbsoftware
Site Admin
Posts: 525
Joined: Fri Dec 31, 2010 12:30 pm
Contact:

Re: Simplecortex: LPC1769 Arduino Format

Post by cfbsoftware » Sun Jan 27, 2013 7:21 am

Oberoid wrote:I used the following settings in Link Options tab:
  • Target: LPC1769
    Crystal Freq (Hz): 12000000
    Heap Start: 00000000H
    Heap Limit: 00000007H
(Not shure if the Heap Start/Limit value's are correct)
Your Heap Start / Limit values are not correct. However, they would only generally show up as a fault if you used the NEW procedure in your application to allocate memory to dynamic (POINTER) variables. You should normally use the default values:

Code: Select all

  Heap Start = 010000200H
  Heap Limit = 0H 
See the topic Using the additional 16 / 32kB of RAM on LPC175x/6x MCUs for an explanation of when you might want to use different Heap Start / Limit settings.

Oberoid
Posts: 18
Joined: Fri Jan 28, 2011 8:57 pm
Location: Amsterdam, Netherlands

Re: Simplecortex: LPC1769 Arduino Format

Post by Oberoid » Sun Jan 27, 2013 8:58 pm

Thanks for the explanation of the LPC1769 memory organization.
I was looking for that in the manual. I have to admit I was overwhelmed by the size of the user manual: a sheer 840 pages*.

So I have here a processor that has the abilities of a little personal computer. And all this power is harnessed in a pcb format that was developed for experimenting with 8 bit microntrollers.

Order of scale: the Coocox development suite + gcc arm - 210 mb
Astrobe is a factor 100 smaller - 2,7 mb
Without Astrobe - I would not know how to reduce the complexity of these systems.

*The user manual of the lp2000 series is "only" 297 pages.

Post Reply