Jump to content

How to port mios32 to other microcontroller?


Arkadiuz
 Share

Recommended Posts

Hello!, I want to use the mios32 with a different microcontroller, an STR7, it's the one on the development kit that I have.

The question is, to those who are familiar with the project, so you can help me to take the decision:

What part of the code, folders, must be ported, how far the changes go, from the low level?

Where do I have to look?

I know that for that is necessary to pick up the datasheet, read a lot, and make the proper changes, I imagine it's a lot of work.

I'd like to get a big picture of what I have to do.

Any help would be great, thanks!

Link to comment
Share on other sites

Welcome aboard Arkaduiz :flowers:

That's a fairly "deep" question and answers sometimes take longer than 24 hours around here... Sadly we're not getting paid to do this ;)

I think you might want to start by having a look at the mios32 repository at http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=/&. That way you might get a rough overview over what is there, and how much is there. It would also be helpful for us to know what exactly you plan to do.

Link to comment
Share on other sites

I don't like "bumpers" who think that they could make pressure for an answer this way, however here some notes that I can give you quickly.

You have to copy the files under $MIOS32_PATH/mios32/STM32F10x to $MIOS32_PATH/mios32/STR7x and adapt each file (if possible), resp. leave them as empty wrappers if the appr. functionality isn't available.

Peripheral drivers (if provided by STM) have to be installed under $MIOS32_PATH/drivers/STR7x

Thereafter install the FreeRTOS low level layer to $MIOS32_PATH/FreeRTOS/Source/portable/GCC/STR7x

The code under $MIOS32_PATH/programming_model/traditional requires adaptions as well.

Port the $MIOS32_PATH/bootloader (especially the flash programming routines)

Finally create a suitable linker file under $MIOS32_PATH/ld/STR7x - done!

Best Regards, Thorsten.

Link to comment
Share on other sites

nILS, thanks, it's my pleasure, it's quite cool what all of you've been doing here!.

TK, thanks a lot for the notes, that is exactly what I needed. I didn't want to pressure, awfully sorry. It won't happen again. Promise.

Both thanks to take the time for answer.

I've downloaded the svn repository, and started to look around, specially the examples and tutorials, very cool and really helpful, although, that wasn't enough information for my problem. That's why I started the thread.

So, the thing is, I'd like to build a universal mackie control, with just a couple of buttons and sliders, no more for now. Later, maybe, add some more of those, and a touch screen on a 320x240 lcd, not important.

I guess that's in the drivers part.

I have a development kit from ST with a uC from STR71 family, running at 48MHz, 64KB flash, and 16 KB RAM, with some IO's, ADCs, UART, USB, and JTAG programming via parallel port. It came with eclipse and the gcc tool chain, ported to windows, and some examples. I downloaded examples from ST to use the USB stack, but none is a usb audio standard.

Now I'm thinking if it's enough memory ¿?. And what environment to use, if eclipse, realview, or linux.

So, I'm still in the part, it's possible to do it with this uC? To avoid a lot of work gone to trash.

Again, thanks to any helpful soul!

Link to comment
Share on other sites

Since your uC as only 64k flash and 16k RAM, I can already inform you that the resources are not sufficient.

Thats the current memory usage of MBLC (Logic Control == Mackie Control)


Macintosh:midibox_lc_v2 TK$ make -s
-------------------------------------------------------------------------------
Application successfully built for:
Processor: STM32F103RE
Family: STM32F10x
Board: MBHP_CORE_STM32
LCD: ks0108
-------------------------------------------------------------------------------
text data bss dec hex filename
62400 96 14328 76824 12c18 project.elf
[/code]

text = flash

bss = RAM

...and the application isn't completed yet

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 1 month later...

Hello again. I need some help.

I'd like to build a MBLC, and experiment a little. As a start, I'm thinking to buy the parts from avishowtech.

I'd like a LC, with common faders, no motor faders, some buttons, and configure them as I like.

For the STM32 Core kit, and make it a MBLC, what other module parts do I need?

Then, is it too hard to write the program for LC? are there some examples?

Thank you so much, best regards!

Link to comment
Share on other sites

I'd like to build a MBLC, and experiment a little. As a start, I'm thinking to buy the parts from avishowtech.

I'd like a LC, with common faders, no motor faders, some buttons, and configure them as I like.

For the STM32 Core kit, and make it a MBLC, what other module parts do I need?

Hi.

It really depends on how many faders/buttons you need.

If you need 12 or less faders then these can be directly connected to J5A/B/C as per http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Ftutorials%2F011_ain%2F However if you need more than 12 then you can use up to 2 MBHP_AIN modules to support up to 64 faders/pots!

For buttons, the MBHP_DINX4 module will support up to 32 buttons (digital inputs). These can be daisy-chained to support up to 128 buttons.

Then, is it too hard to write the program for LC? are there some examples?

TK has written lots of examples. There is a fairly complete implementation of MBLC here http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_lc_v2%2F and lots of tutorials here http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Ftutorials%2F

Cheers

Phil

Link to comment
Share on other sites

Phil, thanks, now I understand how the modules work. It's really cool how it's done, the AIN and the DIN. Once I've the kit ready, I'll start to play to make it an MBLC to use with Cubase. I plan to use 8 faders and 16 buttons as a start. Meanwhile, I'll try to set up the programming enviroment in linux, and compile something, and explore the code and examples. Also, later I'd like to drive a 320x240 graphic lcd, based on a sed1315 controller. In case of success with that I'll upload the driver for that display. I'll stick futures questions about this project on this thread.

Hope to get something working soon!

Folks, thanks again, see you around!

Link to comment
Share on other sites

Alright, I'm having some problems to get this working under Linux.

I've downloaded and installed Sourcery G++ Lite 2010q1-188 for ARM EABI.
Created the env variables:
export PATH=$PATH:$HOME/CodeSourcery/Sourcery_G++_Lite/bin
export MIOS32_PATH=$HOME/mios32
export MIOS32_FAMILY=STM32F10x
export export MOS32_BIN_PATH=$MIOS32PATH/bin
export MIOS32_GCC_PREFIX=arm-none-linux-gnueabi
export MIOS32_PROCESSOR=STM32F103RE
export MIOS32_BOARD=MBHP_CORE_STM32
export MIOS32_LCD=clcd

Then, inside $MIOS32_PATH/apps/controllers/midibox_lc_v2 , make -s gives this:

[midibox_lc_v2]make -s
collect2: ld terminated with signal 11 [segmentation fault]
$HOME/home/user/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: warning: libm.so.6, needed by /home/user/CodeSourcery/Sourcery_G++_Lite/bin/../arm-none-linux-gnueabi/libc/thumb2/usr/lib/libstdc++.so, not found (try using -rpath or -rpath-link)
/home/user/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: error: app.o: Conflicting architecture profiles M/A
/home/user/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: failed to merge target specific data of file app.o

And so on... :-S

I think maybe isn't well configurated Sourcery G++, or there are libraries missing?

Thanks

Edited by Arkadiuz
Link to comment
Share on other sites

Great news! I've discover something:

If you install a newer version of Sourcery G++, like I did, it doesn't compile, gives the error like above. I tried the arm-2009q3-68-arm-none-eabi, and tadaa:

-------------------------------------------------------------------------------

Application successfully built for:

Processor: STM32F103RE

Family: STM32F10x

Board: MBHP_CORE_STM32

LCD: ks0108

-------------------------------------------------------------------------------

arm-none-eabi-size project.elf

text data bss dec hex filename

63208 96 14368 77672 12f68 project.elf

So, it's important to stick with that version of toolchain. ummm.., I wonder, why?

See you!

Link to comment
Share on other sites

I was trying to compile MIOS Studio 2 under Mandriva Linux 2009.1, with kernel x86 2.6.31.5, KDE4.2, juce 1.51, gcc 4.4.1 ; and found that:

In the file mios32/trunk/tools/mios_studio/src/gui/OscTool.h , line 21

#include "UdpSocket.h"

should be something like

#include "../UdpSocket.h"

and in the file mios32/trunk/tools/mios_studio/src/gui/OscTool.cpp , line 17

#include "UdpSocket.h"

should be something like

#include "../UdpSocket.h"

Once solved that, when the linking process starts, it errors with

undefined reference to `__sync_add_and_fetch_4'

To solve it I edited mios32/trunk/tools/mios_studio/build/linux/MiosStudio.make , in the lines of CFLAGS I added "-march=i686" , (took that solution searching the web), and it went just fine.

That MIOS STUDIO is a nice piece of work.

Now I'm fighting the MIDI from the linux side.

Link to comment
Share on other sites

  • 4 months later...

Hello, I've been experimenting with the mios32 and the modules, to get a basic LC, and arrived to nice results.

I didn't included led rings nor motor faders, it's more expensive and difficult for me, and I'm not interested for now.

I'd like to know, how is mechanism to receive data from an audio tool, when working with a logic control?

For example, I'd like to display time/beats information on the lcd. But I can't find the way to do it...

Is there a mc_map with events associated for receiving data, or it works trough sysex messages?

I need a spark of light here.

Thanks

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...