| Details | Message |
|---|
Read-Only Author Joram Querner Posted 19-Oct-2009 10:11 GMT Toolset None |  STM32-103STK usb connection Joram Querner I have a STM32-103STK board with a keil ulink-me usb programmer. My job is to create a USB connection to the pc. I've downloaded the USB-HID demo from keil (http://www.keil.com/download/docs/361.asp), compiled it and loaded it onto the board. But the demo isn't working. I know it would not work as it should be cause this board hasn't have the leds, but windows should recognize a USB device I think. Does anyone knows how to get this working? Would this demo work on this board? |
|
Read-Only Author Tamir Michael Posted 19-Oct-2009 10:14 GMT Toolset None |  RE: STM32-103STK usb connection Tamir Michael maybe there is a jumper that enables USB...? just guessing - I don't know you specific board/processor. |
|
Read-Only Author Joram Querner Posted 19-Oct-2009 10:16 GMT Toolset None |  RE: STM32-103STK usb connection Joram Querner there is no jumper this is the board: http://www.olimex.com/dev/stm32-103stk.html it has a STM32F103RBT6 processor on it |
|
Read-Only Author Tamir Michael Posted 19-Oct-2009 10:22 GMT Toolset None |  RE: STM32-103STK usb connection Tamir Michael any reason you are not using the samples provided by Olimex? You have an HID sample available on the page you linked to! |
|
Read-Only Author Joram Querner Posted 19-Oct-2009 10:39 GMT Toolset None |  RE: STM32-103STK usb connection Joram Querner those are samples for EW-ARM 5.11 and i'm using the keil software to program it. Or is it possible to use/adjust those examples? |
|
Read-Only Author Tamir Michael Posted 19-Oct-2009 10:41 GMT Toolset None |  RE: STM32-103STK usb connection Tamir Michael you can _easily_ adjust them and compile using MDK. been there, done that - no problem really, if you can afford to invest only a few moments (if you know what you are doing of course). |
|
Read-Only Author Joram Querner Posted 19-Oct-2009 11:15 GMT Toolset None |  RE: STM32-103STK usb connection Joram Querner i'm not really sure what i do is the right way but i took all the c and h files from the example and put them in a new uvision project and build that. The main problem is that he can't find intrinsics.h and it is in files i can't edit. |
|
Read-Only Author Tamir Michael Posted 19-Oct-2009 11:25 GMT Toolset None |  RE: STM32-103STK usb connection Tamir Michael If I remember correctly, this file contains macros to disable interrupts etc. but surely, you can download an evaluation version of olimex IDE and take use the installed header file - no harm done, no license needed for that. |
|
Read-Only Author Joram Querner Posted 19-Oct-2009 12:10 GMT Toolset None |  RE: STM32-103STK usb connection Joram Querner yeah, ive got it but now this: C:\Program Files\Keil\ARM\RV31\INC\intrinsics.h(25): error: #35: #error directive: "File intrinsics.h can only be used together with iccarm." there is an exe in the newly installed software IAR and it says: IAR ANSI C/C++ Compiler V5.40.2.21604/W32 EVALUATION for ARM what now? compiling with iccarm? i think this isn't going to work... |
|
Read-Only Author Tamir Michael Posted 19-Oct-2009 12:13 GMT Toolset None |  RE: STM32-103STK usb connection Tamir Michael but surely you can extract from that header file only what you need? the error you see in invoked by some kind of conditional preprocessor construct. but you don't need all that - just the fundamental definitions. |
|
Read-Only Author Joram Querner Posted 19-Oct-2009 12:24 GMT Toolset None |  RE: STM32-103STK usb connection Joram Querner ah, i see but in the file there is used a lot of __intrinsic types what the compiler doesn't understands |
|
Read-Only Author Tamir Michael Posted 19-Oct-2009 12:32 GMT Toolset None |  RE: STM32-103STK usb connection Tamir Michael then I suggest to look in the toolchain folder to see what the type actually is. if it is a simple type, just replace it. but are you sure you even need it under MDK...? maybe you can just remove it? |
|
Read-Only Author Joram Querner Posted 19-Oct-2009 13:21 GMT Toolset None |  RE: STM32-103STK usb connection Joram Querner i checked if i could find him and it looks it is something parsed by the compiler, can't find a real type. So i emptied the whole file and then i got errors in some other files. Unknown identifiers and more, and they where not in the emptied file. |
|
Read-Only Author Tamir Michael Posted 19-Oct-2009 13:23 GMT Toolset None |  RE: STM32-103STK usb connection Tamir Michael remove "__intrinsic" only...! what happens then? |
|
Read-Only Author Joram Querner Posted 19-Oct-2009 13:24 GMT Toolset None |  RE: STM32-103STK usb connection Joram Querner errors... it needs a type |
|
Read-Only Author Tamir Michael Posted 19-Oct-2009 13:30 GMT Toolset None |  RE: STM32-103STK usb connection Tamir Michael Look, I cannot help you without seeing _something_. Post, using the correct tags please, one of the functions MDK needs and exists in that header file. |
|
Read-Only Author Andy Neil Posted 19-Oct-2009 13:31 GMT Toolset ARM |  I know it would not work as it should be cause this board hasn't have the leds Andy Neil "I've downloaded the USB-HID demo from keil compiled it and loaded it onto the board. But the demo isn't working. I know it would not work as it should be cause this board hasn't have the leds" I imagine that the LEDs would be the least of your problems! Embedded software like this is very specific to the hardware that it will run on - you cannot just take an example from one place, and expect it to work on any arbitrary board from somewhere completely different! You need to check very carefully what hardware & connections the software requires, and then see if those are provided on the particular board that you have - if they aren't (which is quite likely), then you will have to modify the source code to match the particular hardware that you actually have. Note that USB is pretty complex - it sounds like you should really be starting with something much simpler... |
|
Read-Only Author Tamir Michael Posted 19-Oct-2009 13:39 GMT Toolset ARM |  RE: I know it would not work as it should be cause this board hasn't have the leds Tamir Michael I believe that in this particular occasion, USB has a pretty good chance to work, as long as the sample is ported entirely, because there are not any board specific configurations required (so it seems) and we are talking about the same processor. I have something similar with an embedded artists board, and there I only needed to build using the Keil suit and set a jumper. |
|
Read-Only Author Andy Neil Posted 19-Oct-2009 14:19 GMT Toolset None |  in this particular occasion, USB has a pretty good chance to work Andy Neil I'm not sure sure. USB involves a lot of code - so that's a lot of work to port it all! Porting requires a good understanding of 'C' programming in general, and at least a working knowledge of both the "source" and the "target" compilers - none of which appears to apply here. I think there really are just too many unknowns in this equation! |
|
Read-Only Author f Querner Posted 19-Oct-2009 13:39 GMT Toolset ARM |  RE: I know it would not work as it should be cause this board hasn't have the leds f Querner "Note that USB is pretty complex - it sounds like you should really be starting with something much simpler..." i have to make this for school project, and we don't get further instructions... "Embedded software like this is very specific to the hardware that it will run on - you cannot just take an example from one place, and expect it to work on any arbitrary board from somewhere completely different!" But where to start? an example from st, olimex or keil? |
|
Read-Only Author Andy Neil Posted 19-Oct-2009 14:16 GMT Toolset ARM |  where to start? Andy Neil The normal starting place for embedded novices is to blink a LED. Then the standard "Hello, World" Then build on that! Given that you have an Olimex board, then Olimex is the obvious place to look for examples! If the Olimex examples are for IAR, why are you using Keil? |
|
Read-Only Author Joram Querner Posted 19-Oct-2009 14:21 GMT Toolset ARM |  RE: where to start? Joram Querner "If the Olimex examples are for IAR, why are you using Keil?" Cause school gave it to us... but i know how to put something on the lcd screen, put led or pin on or off... |
|
Read-Only Author Andy Neil Posted 19-Oct-2009 14:42 GMT Toolset ARM |  RE: Cause school gave it to us... Andy Neil Gave what to you? Keil? The Olimex board? If they gave you these things, they must have assumed that a competent student, at this point in the course, should be able to complete the assignment with them... |
|
Read-Only Author Joram Querner Posted 22-Oct-2009 09:59 GMT Toolset ARM |  RE: Cause school gave it to us... Joram Querner problem solved, solution: use examples from ST with the following settings: #define USB_DISCONNECT GPIOC #define USB_DISCONNECT_PIN GPIO_Pin_11 #define RCC_APB2Periph_GPIO_DISCONNECT RCC_APB2Periph_GPIOC |
|