Jump to content

Easiest way to start with CORE_STM32


d49l
 Share

Recommended Posts

Hi!

What is the fastest way to learn to program CORE_STM32 Module?

I have programmed some C code before, but not on a micro controller. So I'm more used to program assembler on PIC an such.

I have ordered a core32 kit and pcb, that i hope will arrive soon :-) Until then it would be nice to be prepared.

What type of development systems are you using? What is the easiest to get started with?

And how about the use of freeRTOS, why do you need a OS on a microcontroller? Wouldn't it be easier and and faster code you just skip the RTOS? To me it just seem like another hurdle to get things done.

Link to comment
Share on other sites

Hi,

What is the fastest way to learn to program CORE_STM32 Module?

To read the tutorials step by step: http://www.ucapps.de/mios32_c.html

What type of development systems are you using? What is the easiest to get started with?

We are using different toolchains, they depend on the OS (Windows/Mac/Linux). It's explained in the MEMO

And how about the use of freeRTOS, why do you need a OS on a microcontroller? Wouldn't it be easier and and faster code you just skip the RTOS? To me it just seem like another hurdle to get things done.

You won't get in touch with FreeRTOS so long you don't want to start timed/independent tasks.

The big advantage of FreeRTOS is the preemptive multitasking and synchronisation mechanisms (mutex) - if you don't see an advantage with such methods (as explained in the tutorials), just ignore them. But I wouldn't program an application without the provided features anymore. If you want to see the differences, just compare the PIC assembly based MBSEQ V3 code with MBSEQ V4.

Check especially how difficult it was to run slow LCD output "in parallel" with timing critical MIDI output - no problem with a RTOS

I gave you access to the hidden programmers section.

Best Regards, Thorsten.

Link to comment
Share on other sites

Thanks for your answer Thorsten!

I'm using windows7. So I downloaded and installed 'MSYS' and 'CodeSourcery G++ Lite'.

Now I got stuck on the 'PATH Environment Variables'...

I don't have the variable 'PATH' under User variables. Should I create this variable?

And should you really empty these PATH variables? and click ok?

And I don't understand this sentence...

Now we can work with just the one PATH variable and continue to ensure that the required directories exist in the path in the right order.

All these settings of all variables feels like some black art... :-) It's feels like something can go very wrong here.

Link to comment
Share on other sites

If you don't have a USER Variable called "PATH", just create it. Windows will automatically add it to the end of the system variable "PATH".

As long as you don't mess about with the system path, you can't really break anything. The order isn't that important, it becomes more important if you have multiple versions of the different utilities like make etc.You just need to make sure that the MSYS bin directory is in the path. (CodeSourcery should set the system path itself)

Cheers

Phil

Link to comment
Share on other sites

What exactly is it you do in...

http://www.midibox.org/dokuwiki/doku.php?id=windows_mios32_toolchain_core

...under the section...

PATH Environment Variables

To me it seems like you don't need the variable 'PATH' under User variables.

Is this correct?

Under the section...

Additional Environment Variables,

you should create some new variables. I can't find what the name of these variables should be?

Is it 2 variables, one with the name 'DOS' and one with the name 'MBHP_CORE_STM32' (without the ending semi colons ':' )?

Link to comment
Share on other sites

To me it seems like you don't need the variable 'PATH' under User variables.

Is this correct?

Not exactly.

The System and User environment variables effectively do the same thing. System is "system wide" and User is configurable on a "per-user" basis.

As a MINUMUM, one of those (system or user) must have ";C:\MSYS\1.0\bin" and ";C:\Program Files\CodeSourcery\Sourcery G++ Lite\bin" The reason I said add this to the user environment is that you can't then break anything "system wide" if you do it wrong :)

Under the section...

Additional Environment Variables,

The instructions aren't very clear I admit! What you need to add (in the user section) is:


Variable:       		Value:

MIOS32_PATH     		x:\path\to\trunk

MIOS32_BIN_PATH 		x:\path\to\trunk\bin

MIOS32_GCC_PREFIX   	arm-none-eabi

MIOS32_FAMILY   		STM32F10x

MIOS32_PROCESSOR    	STM32F103RE

MIOS32_BOARD        	MBHP_CORE_STM32

MIOS32_LCD          	clcd

If I get time, I will try to add some screenshots and improve the wiki instuctions!

Cheers

Phil

Edited by philetaylor
Link to comment
Share on other sites

Perl is only "required" if you wish to "make dist" MIOS apps. I thought you were developing for MIOS32???

If you "really" want perl, you could always try http://www.activestate.com

Obviously putting a direct download link to make things easier for people can backfire when the download location changes :)

Cheers

Phil

Link to comment
Share on other sites

Ok! So thats not for mios32? I have a hard time to understand all this :-) I'm totaly new to all this midibox stuff, so I don't know the history behind it all.

so... http://www.midibox.org/dokuwiki/windows_toolchain_svn ... it's about the 8bit stuff?

So after I have followed the guidelines here...

http://www.midibox.org/dokuwiki/doku.php?id=windows_mios32_toolchain_core

... whats next?

Under 'SVN Repository' in the above page, was a link to this http://www.midibox.org/dokuwiki/windows_toolchain_svn

So I thought that I needed to do the stuff there to get access to the repository :-( Somewhat confusing.

Link to comment
Share on other sites

Hi!

I guess that the right way to download the repository

on windows is the following...

Download and install TortoiseSVN from their downloadpage http://tortoisesvn.net/downloads

Create a new folder to save the code from the repository in. For a basic setup, create the following

c:\mios32\

Left click on th mios32 folder and choose 'SWN Checkout...'

In the field 'URL of repository', paste the following...

svn://svnmios.midibox.org/mios32

and click ok.

Now, at any time that you want to update the repository,

Left click on th mios32 folder and choose 'SWN Update'

Link to comment
Share on other sites

Ok!

I want to thank everyone for their help :-) After I'm finished with all the basic steeps I think I will make an document about all steps I have done. That will make it easier for now ones, like me :-) And you don't have to answer all the questions one more time...

Now for the next steep...

Lets say that I want to compile the first example in the tutorial. On my computer it can be found here...

C:\mios32\trunk\apps\tutorials\001_forwarding_midi\

I have followed the steps in...

http://www.midibox.org/dokuwiki/doku.php?id=windows_mios32_toolchain_core

For the 'Additional Environment Variables' I have used the following...

Variable: Value:

MIOS32_PATH c:\mios32\trunk

MIOS32_BIN_PATH c:\mios32\trunk\bin

MIOS32_GCC_PREFIX arm-none-eabi

MIOS32_FAMILY STM32F10x

MIOS32_PROCESSOR STM32F103RE

MIOS32_BOARD MBHP_CORE_STM32

MIOS32_LCD clcd

Ok! so how do I compile the first steep in the tutorial?

Link to comment
Share on other sites

I assume you'd open your command prompt, cd to the dir with the Makefile in it, then type make.

That one was easy :-) It gave me a good laugh of surprise.

Then I just have to wait for my CORE_STM32 board to arrive.

Then thats all for now...

CU L8er

Link to comment
Share on other sites

  • 1 month later...

Hi guys,

I like this thread, It has helped me setup the core tools on my computer and to input all the variables. One issue I am having and I am not sure where I have gone wrong. In CMD I can run make -version and I get the relevant information about make. But when I goto the .svn depo that I have installed onto my C: and goto the tut dir and then type make, I get an error saying that make is an invalid command or exe so on.

I followed everything here Core Toolchain Setup

Does any of the great programmers here have an idea of where I might start to look?

I have just got my Core32 and am willing to get the tuts started so I can complete this monster of a project.

Regards,

Evan

Link to comment
Share on other sites

ok ok, I am getting there but now when the tut asks me to edit PATH under User variables, I do not have a PATH under this variables. I understand that this PATH maybe different from pc to pc but how would I get this PATH to show? If I have to create a new value, what should be in this PATH?

Regards,

Evan

UPDATE: Since this I have just continued on and just added the PATH from system into user. I have made it to the end but I am still unable to use make.

Sorry to be a noob for everyone. Wish I could just get it to work. If you need any more information please just let me know and I will provide as much as I can.

Edited by spiltmidi
Link to comment
Share on other sites

If you don't have a "User" PATH, then you can just create one. Alternatively, you can just add to the "System" PATH.

What error do you get when you type "MAKE"? This should work as long as the directory that contains make.exe is in one of the PATH variables above.

Cheers

Phil

Link to comment
Share on other sites

If you don't have a "User" PATH, then you can just create one. Alternatively, you can just add to the "System" PATH.

What error do you get when you type "MAKE"? This should work as long as the directory that contains make.exe is in one of the PATH variables above.

Cheers

Phil

Hi Phil, C:\MSYS\1.0\bin ;C:\Program Files\CodeSourcery\Sourcery G++ Lite\bin this is the PATH that is under the system variables. Msys\1.0\bin has the make.exe inside it. The error I get is "'make' is not recognized as an internal or external command, operable program or batch file"

I had removed everything after I found out that I used the 8bit and not the 32bit tut. Once this has been done I cannot also run the make -version in command, This can only be run in the MSYS prompt now. Here is a screen shot of what is going on, Hope it helps.

PATH.jpg

Edited by spiltmidi
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...