Skip to main content

Trimmed suites and port status update

4 replies [Last post]
fraybentos
Offline
Joined: 2007-11-16

Hi,

I've managed to modify the Squawk sources and change the build system to build the VM and VM bootstrap for a cortex-m3 board.

Is it possible to create a trimmed suite that is a single binary image that can be directly flashed onto a device?

Thanks,
Robert

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
eric_arseneau
Offline
Joined: 2004-07-15

I assume this das bobby?

Hey can we share code?

Which dev board did you get? I got one from Luminary.

We are done with J1 and such and there are opportunities we could leverage if we can get a decent Cortex M3 port going.

Would you be willing for me to create a port sub project and we can work on it with Derek and I?

How are you building the VM? I assume you are using rom command, if so, then you can do a rom with something like
d rom -strip:a cldc imp myapp

That should create a single suite with dead code elimination turned on. But the rom command will need the flags you use to build the VM so the suite matches the vm.

fraybentos
Offline
Joined: 2007-11-16

Hi Eric,

Yes it is Robert. I would be more than happy to share the code, If you create a subproject I will start to check things in. Everything is really hacked together at the moment but I can check files in as I clean things up.

I have a STM3210E_EVAL (http://www.st.com/mcu/contentid-100-110-STM3210E_EVAL.html) board from ST. Among other things it has a STM32F103ZE MCU based on an ARM Cortex-M3 core. The STM32F103ZE runs at 72MHz, has 64K of RAM and 512K of flash. ARM has introduced a software API, called CMSIS, which is meant to enable code portability between software vendors and cortex MCUs (M0, M3, A8 etc.). If we stick to using this, hopefully we can re-use a lot of the code. Someone mentioned that they may be able to loan me a Luminary board so that may be a better option.

I'm currently using a modified version of the SDK build system to build the Cortex-M3. I'll take a look -strip option.

Thanks,
Robert

eric_arseneau
Offline
Joined: 2004-07-15

How are things going here?

I have a luminary board, as does Arshan at this point. So we can help if you want.

Will see what information I can collect on CMSIS and see what it enables for us.

fraybentos
Offline
Joined: 2007-11-16

Hi Eric,

Here is what I have so far:

I can compile and link Squawk (slow VM, Squawk bootstrap, ARM VM components etc.) for the STM32F103ZE ARM Cortex-M3 based MCU. I still need to fix compiler warning messages and fill in the code for the low level functions C functions (e.g. functions that reside in os.c). These functions are currently empty because I was trying to get things compiled first. This shouldn't be too much work since the STM32 doesn't have an MMU and I don't have a power controller to deal with. I'm also using the peripheral driver code supplied by ST which I believe is released under a BSD-like licence so the functions I need to implement can just call into the ST libraries.

The compiler is warning me that O_BINARY is redefined in platform.h. O_BINARY is not defined for the gcc toochain used for the eSPOT but is defined in the toolchain I'm using (arm-none-eabi-gcc v4.3.3). I'm not sure what the correct solution to this is, remove the definition or do an #undef/#def?

I also need to investigate the Squawk builder flags that produce single suite images.

Once I've done this I can flash the VM onto the board and start debugging. I have no idea how long this task will take (hopefully not long).

While the Luminary boards also have a Cortex-M3 MCU, I believe the register layout and names are totally different from the ST MCUs. However, the Luminary libraries are based on CMSIS so if I keep things at a high-enough level we can hopefully re-use a lot of the work.

Thanks,
Robert