Support for NXP ARM9 LPC29xx Family

by Crossware 18. September 2013 11:50

We have just released support for NXP ARM9 LPC29xx family of microcontrollers.

See this page for more details of this support:



ColdFire Parallel Port Debugging on Windows 7

by Crossware 26. April 2013 07:38

We do not have a Windows 7 PC which has a parallel port and so we have never been able to try a ColdFire parallel port BDM interface on this operating system.  It was clear that parallel port debugging on the 64-bit version of Windows 7 was not going to be possible because our parallel port driver is a kernel driver and is not signed.  As such, Windows 7 64-bit edition will not allow it to be installed under any circumstances.

Now we have information from one of our ColdFire customers who has recently migrated our ColdFire Suite to new PCs that use Windows 7 32-bit edition.  They report that parallel port debugging with our ColdFire Suite and the P&E Micro parallel port BDM interface works successfully.



First jState supporting Development Suite released

by Crossware 3. May 2012 15:01

jState is our new Javascript simulator extension interface.  With the V8 Javascript engine integrated into the environment, extending the Crossware Cortex-M3 simulator is fast and simple.

The STM32 Development Suite is the first package to incorporate jState and a new evaluation version is available: STM32 Development Suite Download.

For an introduction to jState see: jState Overview

For more details see:  jState Documentation

Tags: , , , , ,


Additional options when purchasing on-line

by Crossware 2. April 2012 17:38

We have added additional options to our on-line shop.

Firstly it is now possible to select Royal Mail Airmail as a carrier option for international shipments.  This delivery option takes longer (sometimes a lot longer - more than 4 weeks for Mexico!) but offers a cost saving over our traditional Fedex International Priority shipment method.

Secondly, we have added PayPal as a payment option so you can purchase items using your PayPal account.  Initially, payments will be processed in pounds sterling.  We will implement additional currencies when we become more familiar with the PayPal system.



Simulator Extensions using Javascript

by Crossware 20. March 2012 15:13


We have integrated Google's V8 Javascript engine into the Crossware environment and is now possible for the simulators to be extended using Javascript.

We've called this interface jState and the next version of Crossware Cortex-M3 simulator will support jState.

You can find more information on jState here: jState - Javascript Simulator Extension Interface


Tags: ,


Suppressing integral promotion in the Crossware 8051 C Compiler

by Crossware 22. February 2012 09:09

We have recently been asked how to put the /Op option on the command line of the Crossware 8051 C Compiler when building from within the Embedded Development Studio IDE.

We do not recommend that the /Op option is applied from the command line.  It can lead to unpredictable results and applying it across a whole module or a whole project can potentially lead to hard to track down faults.

Instead we recommend that it is applied to specific functions using the optimize pragma.

Here is the html version manual page for the /Op option:

At the bottom of that page is a link to the page for the optimize pragma:

So you would do something like this:

unsigned char a, b, c, d;

#pragma optimize("p", on)

    a = (b + c) / d;

#pragma optimize( "", on )

In this example, only the expressions in the function func() will have integral promotion suppressed.

Nevertheless, it is possible to apply command line options that are not specifically supported by the IDE by using the CCommandLine entry in a target.ini file.  See this page:



Web and mail server downtime

by Crossware 15. February 2012 17:40

The Crossware web and mail servers went offline on Friday due to a failure of our Internet connection. We relocated the servers when it was clear that the issue would take some time to solve and the servers were operational in their new location by Monday afternoon. 

The Internet connection fault is now fixed and everything should now be back to normal.



First steps with the STM32 Cortex-M3 based Microcontroller

by Crossware 14. December 2011 17:40

Our STM32 Development Suite is proving to be very popular and to help new users get started we have prepared a brief tutorial.

 You can access the tutorial using this link:

Tags: , ,


How to see the output from the ARM LPC2103?

by Crossware 25. October 2011 10:36

A question we have just been asked is "How to see the output of the ARM LPC2103 on Crossware?".

We will assume that the user is interested in outputting messages from the excecuting ARM chip.

Here is a simple method of doing that.

Create a new project selecting the NXP LPC2103 as the target chip, accepting all defaults offered by the New Project Wizard.


printf("Hello world\n");

to main(). For example:

    printf("Hello world\n");
    while (1)

Use the Headers Wizard to add the include file stdio.h to the xstdsys.h.  (Or manually add #include <stdio.h> to just above main().)

Build the project.

Run the program in the simulator and the Hello world message will appear in the Debug view.

Run the program on the hardware using the Jaguar USB debugger interface and the Hello world message will also appear in the Debug view.

How does this work?

The ARM7 debug communication channel (DCC) is being used to route the message to the Debug view.  A special putch() routine in the library sends the output to the DCC.  When you add printf() to your program, putch() is required as the output function.  If you do not include your own version of putch() in your program then this special library version will be automatically included.  When debugging with Jaguar, Jaguar captures the output from the DCC and the debugger writes it to the Debug view.  When simulating, the DCC is simulated and so the output is captured and written to the debug view in a similar way.

This use of the DCC is often referred to as 'semi-hosting'.  For more information on semi-hosting see the ARM Simulator and Debugger User Guide via the Books view or refer to this and following pages of the online version of the guide:




Fast variable bit-stream output in C on Cortex-M3

by Crossware 6. October 2011 13:36

In the previous post we described a method of outputting a fixed bit pattern to a port pin.  The method we used will work on all ARM chips - ARM7, ARM9 and Cortex-M3.  The result was a single write instruction for each output bit.

In this post we will use the bit-banding of the Cortex-M3 core to achieve a fast output of a variable bit stream.

The Cortex-M3 core has two bit-banded regions:

1. on-chip SRAM space starting at address 0X20000000 and

2. on-chip peripheral space starting at address 0X40000000.

To read or write a single bit in the on-chip SRAM space we write into the bit-banded region starting at 0X22000000.

To read or write a single bit in the on-chip peripheral space we write into the bit-banded region starting at 0X42000000.

The ARM documentation give the algorithm to calculate a bit address.  Using this information, we have defined four macros to simplify our coding:

#define byte_base_difference 0X20000000
#define byte_offset(a) (((unsigned long)&(a)) - byte_base_difference)
#define bit_word_offset(a, bit_number) ((byte_offset(a) * 32) + (bit_number * 4))
#define bit_word_addr(a, bit_number, bit_band_base) (bit_band_base + bit_word_offset(a, bit_number))

Now if we define a variable such as:

unsigned long nDWord;

the address of the first bit of this variable will be:

#define addrbit0 (unsigned long*)bit_word_addr(nDWord, 0, 0X22000000)

We can write a 32-bit value into nDWord using a normal assignment, and we can read it one bit at a time using the appropriate bit-band address.  Using this method we avoid the need to do any shifting.  (By the way, this method of avoiding shifts has been possible on the 8051 microcontroller for the last 30 years!)

Similarly we can use the same macros to define the address of a bit in an on-chip peripheral register.  For instance the address of bit 12 of the EFM32 port A data out register is:

#define addrDoutPA12 (unsigned long*)bit_word_addr(g_pGPIO->PA_DOUT, 12, 0X42000000)

We can use this address to write to this bit and set or clear pin PA12.  (Not forgetting to enable the GPIO clock and configure PA12 as an output using the GPIO graphical wizard.)

We can assign these addresses to locally defined pointers to ensure that the addresses are kept in registers:

unsigned long* pBit = addrbit0;
unsigned long* pPin = addrDoutPA12;

Then for instance to output bit 2 of nDWord to PA12, we can use a simple assignment:

*pPin = *(pBit + 2);

 Here is a function that will write all 32 bits of nDWord to PA12:

void output_pattern(unsigned long nPattern)
    nDWord = nPattern;         // get the bit-stream bits into bit-banded SRAM
    // local variables so that the reside in registers:
    unsigned long* pBit = addrbit0;
    unsigned long* pPin = addrDoutPA12;

    *pPin = *(pBit + 0);
    *pPin = *(pBit + 1);
    *pPin = *(pBit + 2);
    *pPin = *(pBit + 3);
    *pPin = *(pBit + 4);
    *pPin = *(pBit + 5);
    *pPin = *(pBit + 6);
    *pPin = *(pBit + 7);
    *pPin = *(pBit + 8);
    *pPin = *(pBit + 9);
    *pPin = *(pBit + 10);
    *pPin = *(pBit + 11);
    *pPin = *(pBit + 12);
    *pPin = *(pBit + 13);
    *pPin = *(pBit + 14);
    *pPin = *(pBit + 15);
    *pPin = *(pBit + 16);
    *pPin = *(pBit + 17);
    *pPin = *(pBit + 18);
    *pPin = *(pBit + 19);
    *pPin = *(pBit + 20);
    *pPin = *(pBit + 21);
    *pPin = *(pBit + 22);
    *pPin = *(pBit + 23);
    *pPin = *(pBit + 24);
    *pPin = *(pBit + 25);
    *pPin = *(pBit + 26);
    *pPin = *(pBit + 27);
    *pPin = *(pBit + 28);
    *pPin = *(pBit + 29);
    *pPin = *(pBit + 30);
    *pPin = *(pBit + 31);


The result is two instructions per line.  One to read the bit from SRAM and the next to write it to the port's data out register:

    LDR    R2,[R1]
    STR    R2,[R0]
    LDR    R2,[R1,#4]
    STR    R2,[R0]
    LDR    R2,[R1,#8]
    STR    R2,[R0]
    LDR    R2,[R1,#12]
    STR    R2,[R0]
    LDR    R2,[R1,#16]
    STR    R2,[R0]
    LDR    R2,[R1,#20]
    STR    R2,[R0]
    LDR    R2,[R1,#24]
    STR    R2,[R0]
    LDR    R2,[R1,#28]
    STR    R2,[R0]
    LDR    R2,[R1,#32]
    STR    R2,[R0]
    LDR    R2,[R1,#36]
    STR    R2,[R0]
    LDR    R2,[R1,#40]
    STR    R2,[R0]
    LDR    R2,[R1,#44]
    STR    R2,[R0]
    LDR    R2,[R1,#48]
    STR    R2,[R0]
    LDR    R2,[R1,#52]
    STR    R2,[R0]
    LDR    R2,[R1,#56]
    STR    R2,[R0]
    LDR    R2,[R1,#60]
    STR    R2,[R0]
    LDR    R2,[R1,#64]
    STR    R2,[R0]
    LDR    R2,[R1,#68]
    STR    R2,[R0]
    LDR    R2,[R1,#72]
    STR    R2,[R0]
    LDR    R2,[R1,#76]
    STR    R2,[R0]
    LDR    R2,[R1,#80]
    STR    R2,[R0]
    LDR    R2,[R1,#84]
    STR    R2,[R0]
    LDR    R2,[R1,#88]
    STR    R2,[R0]
    LDR    R2,[R1,#92]
    STR    R2,[R0]
    LDR    R2,[R1,#96]
    STR    R2,[R0]
    LDR    R2,[R1,#100]
    STR    R2,[R0]
    LDR    R2,[R1,#104]
    STR    R2,[R0]
    LDR    R2,[R1,#108]
    STR    R2,[R0]
    LDR    R2,[R1,#112]
    STR    R2,[R0]
    LDR    R2,[R1,#116]
    STR    R2,[R0]
    LDR    R2,[R1,#120]
    STR    R2,[R0]
    LDR    R2,[R1,#124]
    STR    R2,[R0]

On an EFM32G890 chip running at 14MHz, outputting 0, 1, 0, 1, 0, 1 etc gave the following waveform:


Copyright © 2011 Crossware Products. All rights reserved.

Tags: , ,


About this blog

This is where you will find topical information that we think might be useful to you.

Month List