Jump to content

Porting MIOS to new CPU


arte
 Share

Recommended Posts

Hi,

I am having some very vague idea about porting MIOS to another platform.

The platform would be a 32bit softcpu running on a FPGA board (Spartan 3A Starter Kit).

I am trying to estimate the workload for this, so what do i need to do?

- Get a working FreeRTOS (This should already be done)

- Fill in all driver stubs, that is adding a directory in trunk/drivers/NEW_CPU

Do I need to change anything in the MIOS32 directory?

Link to comment
Share on other sites

Hi,

the most simple way to find this would be to change the MIOS32 environment variables before compiling any application (such as apps/templates/app_skeleton)

So, instead of:

export MIOS32_FAMILY=STM32F10x
export MIOS32_PROCESSOR=STM32F103RE
export MIOS32_BOARD=MBHP_CORE_STM32[/code] you would write:
[code]export MIOS32_FAMILY=MYFAMILY
export MIOS32_PROCESSOR=MYPROCESSOR
export MIOS32_BOARD=MYBOARD

All source codes and Makefiles which are checking/referencing to these values will print out an error message (sometimes very verbose since they are generated with #error)

This simple check also gives you the files locations or directories where something has to be changed, resp. where a new directory with similar files has to be created.

E.g., usually MIOS32 based applications don't refer to any driver functions under drivers/$MIOS32_FAMILY - this is only done under mios32/$MIOS32_FAMILY (the HW adaption layer, take the files in the mios32/STM32F10x directory as a reference), the programming_model/traditional (which will need some #ifdef statements for your environment)

Means: probably you don't need to refer any "driver" functions at all if your SoC doesn't support such a library. Instead you would have to configure/access peripheral functions directly in the MIOS32 HW adaption layer

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...