beginners question

classic Classic list List threaded Threaded
12 messages Options
Justin Cormack Justin Cormack
Reply | Threaded
Open this post in threaded view
|

beginners question

I have flashed a STM32F4DISCOVERY with eLua, but it is kind of unclear
which pins the console is on, can anyone help! (there doesnt seem to
be a console on USB unless I am mistaken).

Justin
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
tobor tobor
Reply | Threaded
Open this post in threaded view
|

Re: beginners question

The usb with the smaller connector CN5 is the console, at least in my case.


On Sun, Dec 1, 2013 at 4:56 PM, Justin Cormack <[hidden email]> wrote:
I have flashed a STM32F4DISCOVERY with eLua, but it is kind of unclear
which pins the console is on, can anyone help! (there doesnt seem to
be a console on USB unless I am mistaken).

Justin
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Justin Cormack Justin Cormack
Reply | Threaded
Open this post in threaded view
|

Re: beginners question

ok thats helpful.

Bus 002 Device 009: ID 0483:3748 STMicroelectronics ST-LINK/V2

[692412.491813] usb 2-1.2: new full-speed USB device number 9 using ehci-pci
[692412.586216] usb 2-1.2: New USB device found, idVendor=0483, idProduct=3748
[692412.586226] usb 2-1.2: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[692412.586231] usb 2-1.2: Product: STM32 STLink
[692412.586236] usb 2-1.2: Manufacturer: STMicroelectronics
[692412.586241] usb 2-1.2: SerialNumber:
V\xffffffc3\xffffffbf\xffffffbfn\x06I\xffffffc2\xffffff86\xffffff86QR(S"\xffffffc2\xffffff87\xffffff87

Is what it is listed as. But I don't get a USBtty device at all... do
you get one just appearing? If so I guess I need to add its id to usb
serial module...


On Mon, Dec 2, 2013 at 12:58 AM, Bill <[hidden email]> wrote:

> The usb with the smaller connector CN5 is the console, at least in my case.
>
>
> On Sun, Dec 1, 2013 at 4:56 PM, Justin Cormack
> <[hidden email]> wrote:
>>
>> I have flashed a STM32F4DISCOVERY with eLua, but it is kind of unclear
>> which pins the console is on, can anyone help! (there doesnt seem to
>> be a console on USB unless I am mistaken).
>>
>> Justin
>> _______________________________________________
>> eLua-dev mailing list
>> [hidden email]
>> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>
>
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Richard Möhn Richard Möhn
Reply | Threaded
Open this post in threaded view
|

Re: beginners question

On Mon, Dec 02, 2013 at 08:28:45AM +0000, Justin Cormack wrote:

> ok thats helpful.
>
> Bus 002 Device 009: ID 0483:3748 STMicroelectronics ST-LINK/V2
>
> [692412.491813] usb 2-1.2: new full-speed USB device number 9 using ehci-pci
> [692412.586216] usb 2-1.2: New USB device found, idVendor=0483, idProduct=3748
> [692412.586226] usb 2-1.2: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [692412.586231] usb 2-1.2: Product: STM32 STLink
> [692412.586236] usb 2-1.2: Manufacturer: STMicroelectronics
> [692412.586241] usb 2-1.2: SerialNumber:
> V\xffffffc3\xffffffbf\xffffffbfn\x06I\xffffffc2\xffffff86\xffffff86QR(S"\xffffffc2\xffffff87\xffffff87
>
> Is what it is listed as. But I don't get a USBtty device at all... do
> you get one just appearing? If so I guess I need to add its id to usb
> serial module...


As its probably still night at Bill's, I'll answer for him.  The
information listed up there are from the wrong port. As Bill said, you
need to connect the USB Micro port, i.e. the one next to the audio
jack, to your PC, too. It then should show up as /dev/ttyACM0 like this:

[  790.750690] cdc_acm 3-1.2:1.0: This device cannot do calls on its own. It is not a modem.
[  790.750726] cdc_acm 3-1.2:1.0: ttyACM0: USB ACM device
[  790.751311] usbcore: registered new interface driver cdc_acm
[  790.751314] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters


Best,

Richard
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Justin Cormack Justin Cormack
Reply | Threaded
Open this post in threaded view
|

Re: beginners question

In reply to this post by Justin Cormack


On 2 Dec 2013 09:05, "Richard Möhn" <[hidden email]> wrote:
>
> On Mon, Dec 02, 2013 at 08:28:45AM +0000, Justin Cormack wrote:
> > ok thats helpful.
> >
> > Bus 002 Device 009: ID 0483:3748 STMicroelectronics ST-LINK/V2
> >
> > [692412.491813] usb 2-1.2: new full-speed USB device number 9 using ehci-pci
> > [692412.586216] usb 2-1.2: New USB device found, idVendor=0483, idProduct=3748
> > [692412.586226] usb 2-1.2: New USB device strings: Mfr=1, Product=2,
> > SerialNumber=3
> > [692412.586231] usb 2-1.2: Product: STM32 STLink
> > [692412.586236] usb 2-1.2: Manufacturer: STMicroelectronics
> > [692412.586241] usb 2-1.2: SerialNumber:
> > V\xffffffc3\xffffffbf\xffffffbfn\x06I\xffffffc2\xffffff86\xffffff86QR(S"\xffffffc2\xffffff87\xffffff87
> >
> > Is what it is listed as. But I don't get a USBtty device at all... do
> > you get one just appearing? If so I guess I need to add its id to usb
> > serial module...
>
>
> As its probably still night at Bill's, I'll answer for him.  The
> information listed up there are from the wrong port. As Bill said, you
> need to connect the USB Micro port, i.e. the one next to the audio
> jack, to your PC, too. It then should show up as /dev/ttyACM0 like this:
>
> [  790.750690] cdc_acm 3-1.2:1.0: This device cannot do calls on its own. It is not a modem.
> [  790.750726] cdc_acm 3-1.2:1.0: ttyACM0: USB ACM device
> [  790.751311] usbcore: registered new interface driver cdc_acm
> [  790.751314] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
>

Hmm I had them both connected. Will poke around a bit more. Are there any jumper settings that affect this or anything?

> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Mike hibbett Mike hibbett
Reply | Threaded
Open this post in threaded view
|

Re: beginners question

That stm32f4discovery board looks great value. I've just ordered one to kick start by elua experiments. For 20 odd bucks, it hardly seems worth building my own board!

Sent from my typewriter

On 2 Dec 2013 09:08, "Justin Cormack" <[hidden email]> wrote:


On 2 Dec 2013 09:05, "Richard Möhn" <[hidden email]> wrote:
>
> On Mon, Dec 02, 2013 at 08:28:45AM +0000, Justin Cormack wrote:
> > ok thats helpful.
> >
> > Bus 002 Device 009: ID 0483:3748 STMicroelectronics ST-LINK/V2
> >
> > [692412.491813] usb 2-1.2: new full-speed USB device number 9 using ehci-pci
> > [692412.586216] usb 2-1.2: New USB device found, idVendor=0483, idProduct=3748
> > [692412.586226] usb 2-1.2: New USB device strings: Mfr=1, Product=2,
> > SerialNumber=3
> > [692412.586231] usb 2-1.2: Product: STM32 STLink
> > [692412.586236] usb 2-1.2: Manufacturer: STMicroelectronics
> > [692412.586241] usb 2-1.2: SerialNumber:
> > V\xffffffc3\xffffffbf\xffffffbfn\x06I\xffffffc2\xffffff86\xffffff86QR(S"\xffffffc2\xffffff87\xffffff87
> >
> > Is what it is listed as. But I don't get a USBtty device at all... do
> > you get one just appearing? If so I guess I need to add its id to usb
> > serial module...
>
>
> As its probably still night at Bill's, I'll answer for him.  The
> information listed up there are from the wrong port. As Bill said, you
> need to connect the USB Micro port, i.e. the one next to the audio
> jack, to your PC, too. It then should show up as /dev/ttyACM0 like this:
>
> [  790.750690] cdc_acm 3-1.2:1.0: This device cannot do calls on its own. It is not a modem.
> [  790.750726] cdc_acm 3-1.2:1.0: ttyACM0: USB ACM device
> [  790.751311] usbcore: registered new interface driver cdc_acm
> [  790.751314] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
>

Hmm I had them both connected. Will poke around a bit more. Are there any jumper settings that affect this or anything?

> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Richard Möhn Richard Möhn
Reply | Threaded
Open this post in threaded view
|

Re: beginners question

In reply to this post by Justin Cormack
On Mon, Dec 02, 2013 at 09:08:21AM +0000, Justin Cormack wrote:

> > As its probably still night at Bill's, I'll answer for him.  The
> > information listed up there are from the wrong port. As Bill said, you
> > need to connect the USB Micro port, i.e. the one next to the audio
> > jack, to your PC, too. It then should show up as /dev/ttyACM0 like this:
> >
> > [  790.750690] cdc_acm 3-1.2:1.0: This device cannot do calls on its own.
> It is not a modem.
> > [  790.750726] cdc_acm 3-1.2:1.0: ttyACM0: USB ACM device
> > [  790.751311] usbcore: registered new interface driver cdc_acm
> > [  790.751314] cdc_acm: USB Abstract Control Model driver for USB modems
> and ISDN adapters
> >
>
> Hmm I had them both connected. Will poke around a bit more. Are there any
> jumper settings that affect this or anything?


No jumper settings, I think. But you should make sure that in
boards/known/stm32f4discovery components.sercon.uart is set to "cdc".
And if that still doesn't work, you might want to find out whether eLua
starts up altogether. If that's not the case, you won't get a ttyACM
device.

Best,

Richard
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Justin Cormack Justin Cormack
Reply | Threaded
Open this post in threaded view
|

Re: beginners question

In reply to this post by Justin Cormack
On Mon, Dec 2, 2013 at 9:45 AM, Richard Möhn <[hidden email]> wrote:

> On Mon, Dec 02, 2013 at 09:08:21AM +0000, Justin Cormack wrote:
>> > As its probably still night at Bill's, I'll answer for him.  The
>> > information listed up there are from the wrong port. As Bill said, you
>> > need to connect the USB Micro port, i.e. the one next to the audio
>> > jack, to your PC, too. It then should show up as /dev/ttyACM0 like this:
>> >
>> > [  790.750690] cdc_acm 3-1.2:1.0: This device cannot do calls on its own.
>> It is not a modem.
>> > [  790.750726] cdc_acm 3-1.2:1.0: ttyACM0: USB ACM device
>> > [  790.751311] usbcore: registered new interface driver cdc_acm
>> > [  790.751314] cdc_acm: USB Abstract Control Model driver for USB modems
>> and ISDN adapters
>> >
>>
>> Hmm I had them both connected. Will poke around a bit more. Are there any
>> jumper settings that affect this or anything?
>
>
> No jumper settings, I think. But you should make sure that in
> boards/known/stm32f4discovery components.sercon.uart is set to "cdc".
> And if that still doesn't work, you might want to find out whether eLua
> starts up altogether. If that's not the case, you won't get a ttyACM
> device.

Ok, I am just using the default board file which has that uart
setting, building with
./build_elua.lua board=stm32f4discovery  (codesourcery toolchain)
then flashing with
dfu-util -d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D
elua_lua_stm32f4discovery.elf
(based on the wiki instructions; it does complain that this is not a
dfu file though)
Then removing the jumpers that put it into dfu mode and restarting.

So maybe eLua isn't booting? Or the above is not correct?

Justin
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Richard Möhn Richard Möhn
Reply | Threaded
Open this post in threaded view
|

Re: beginners question

On Mon, Dec 02, 2013 at 10:43:24AM +0000, Justin Cormack wrote:

> Ok, I am just using the default board file which has that uart
> setting, building with
> ./build_elua.lua board=stm32f4discovery  (codesourcery toolchain)
> then flashing with
> dfu-util -d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D
> elua_lua_stm32f4discovery.elf
> (based on the wiki instructions; it does complain that this is not a
> dfu file though)
> Then removing the jumpers that put it into dfu mode and restarting.
>
> So maybe eLua isn't booting? Or the above is not correct?


I haven't got any experience with DFU since I always flashed the board
via ST-LINK. On my Debian system [1] works quite well for that. To find
out whether eLua ist booting at all, you could turn on an LED by adding
this at the end of platform_init() in src/platform/stm32f4/platform.c:

    GPIO_InitTypeDef led;
    led.GPIO_Pin   = GPIO_Pin_12;
    led.GPIO_Mode  = GPIO_Mode_OUT;
    led.GPIO_Speed = GPIO_Speed_25MHz;
    led.GPIO_OType = GPIO_OType_PP;
    led.GPIO_PuPd  = GPIO_PuPd_NOPULL;
   
    GPIO_Init(GPIOD, &led);

    GPIO_SetBits(GPIOD, GPIO_Pin_12);

If eLua boots, the green LED (LD4) should be turned on, if not, not.

Best,

Richard


[1] https://github.com/texane/stlink
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Justin Cormack Justin Cormack
Reply | Threaded
Open this post in threaded view
|

Re: beginners question

In reply to this post by Justin Cormack
On Mon, Dec 2, 2013 at 11:43 AM, Richard Möhn
<[hidden email]> wrote:

> On Mon, Dec 02, 2013 at 10:43:24AM +0000, Justin Cormack wrote:
>> Ok, I am just using the default board file which has that uart
>> setting, building with
>> ./build_elua.lua board=stm32f4discovery  (codesourcery toolchain)
>> then flashing with
>> dfu-util -d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D
>> elua_lua_stm32f4discovery.elf
>> (based on the wiki instructions; it does complain that this is not a
>> dfu file though)
>> Then removing the jumpers that put it into dfu mode and restarting.
>>
>> So maybe eLua isn't booting? Or the above is not correct?
>
>
> I haven't got any experience with DFU since I always flashed the board
> via ST-LINK. On my Debian system [1] works quite well for that. To find
> out whether eLua ist booting at all, you could turn on an LED by adding
> this at the end of platform_init() in src/platform/stm32f4/platform.c:
>
>     GPIO_InitTypeDef led;
>     led.GPIO_Pin   = GPIO_Pin_12;
>     led.GPIO_Mode  = GPIO_Mode_OUT;
>     led.GPIO_Speed = GPIO_Speed_25MHz;
>     led.GPIO_OType = GPIO_OType_PP;
>     led.GPIO_PuPd  = GPIO_PuPd_NOPULL;
>
>     GPIO_Init(GPIOD, &led);
>
>     GPIO_SetBits(GPIOD, GPIO_Pin_12);
>
> If eLua boots, the green LED (LD4) should be turned on, if not, not.
>

Looks like its not booting then... Certainly looks like it might be
easier to diagnose on the st-link. What hardware do I need to connect
to it?

Justin
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Justin Cormack Justin Cormack
Reply | Threaded
Open this post in threaded view
|

Re: beginners question

In reply to this post by Justin Cormack
On Mon, Dec 2, 2013 at 11:43 AM, Richard Möhn
<[hidden email]> wrote:

> On Mon, Dec 02, 2013 at 10:43:24AM +0000, Justin Cormack wrote:
>> Ok, I am just using the default board file which has that uart
>> setting, building with
>> ./build_elua.lua board=stm32f4discovery  (codesourcery toolchain)
>> then flashing with
>> dfu-util -d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D
>> elua_lua_stm32f4discovery.elf
>> (based on the wiki instructions; it does complain that this is not a
>> dfu file though)
>> Then removing the jumpers that put it into dfu mode and restarting.
>>
>> So maybe eLua isn't booting? Or the above is not correct?
>
>
> I haven't got any experience with DFU since I always flashed the board
> via ST-LINK. On my Debian system [1] works quite well for that. To find
> out whether eLua ist booting at all, you could turn on an LED by adding
> this at the end of platform_init() in src/platform/stm32f4/platform.c:
>
>     GPIO_InitTypeDef led;
>     led.GPIO_Pin   = GPIO_Pin_12;
>     led.GPIO_Mode  = GPIO_Mode_OUT;
>     led.GPIO_Speed = GPIO_Speed_25MHz;
>     led.GPIO_OType = GPIO_OType_PP;
>     led.GPIO_PuPd  = GPIO_PuPd_NOPULL;
>
>     GPIO_Init(GPIOD, &led);
>
>     GPIO_SetBits(GPIOD, GPIO_Pin_12);
>
> If eLua boots, the green LED (LD4) should be turned on, if not, not.

Ah brilliant! the st tools work fine, and the console appears... All
good, time to hack!

Justin
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Justin Cormack Justin Cormack
Reply | Threaded
Open this post in threaded view
|

Re: beginners question

In reply to this post by Mike hibbett


On 2 Dec 2013 09:42, "Mike hibbett" <[hidden email]> wrote:
>
> That stm32f4discovery board looks great value. I've just ordered one to kick start by elua experiments. For 20 odd bucks, it hardly seems worth building my own board!

Yes it seems to be the cheapest way to get started. I will update the wiki with some more up to date instructions. Will get some for the school kids I have been working with.

Justin

> Sent from my typewriter
>
> On 2 Dec 2013 09:08, "Justin Cormack" <[hidden email]> wrote:
>>
>>
>> On 2 Dec 2013 09:05, "Richard Möhn" <[hidden email]> wrote:
>> >
>> > On Mon, Dec 02, 2013 at 08:28:45AM +0000, Justin Cormack wrote:
>> > > ok thats helpful.
>> > >
>> > > Bus 002 Device 009: ID 0483:3748 STMicroelectronics ST-LINK/V2
>> > >
>> > > [692412.491813] usb 2-1.2: new full-speed USB device number 9 using ehci-pci
>> > > [692412.586216] usb 2-1.2: New USB device found, idVendor=0483, idProduct=3748
>> > > [692412.586226] usb 2-1.2: New USB device strings: Mfr=1, Product=2,
>> > > SerialNumber=3
>> > > [692412.586231] usb 2-1.2: Product: STM32 STLink
>> > > [692412.586236] usb 2-1.2: Manufacturer: STMicroelectronics
>> > > [692412.586241] usb 2-1.2: SerialNumber:
>> > > V\xffffffc3\xffffffbf\xffffffbfn\x06I\xffffffc2\xffffff86\xffffff86QR(S"\xffffffc2\xffffff87\xffffff87
>> > >
>> > > Is what it is listed as. But I don't get a USBtty device at all... do
>> > > you get one just appearing? If so I guess I need to add its id to usb
>> > > serial module...
>> >
>> >
>> > As its probably still night at Bill's, I'll answer for him.  The
>> > information listed up there are from the wrong port. As Bill said, you
>> > need to connect the USB Micro port, i.e. the one next to the audio
>> > jack, to your PC, too. It then should show up as /dev/ttyACM0 like this:
>> >
>> > [  790.750690] cdc_acm 3-1.2:1.0: This device cannot do calls on its own. It is not a modem.
>> > [  790.750726] cdc_acm 3-1.2:1.0: ttyACM0: USB ACM device
>> > [  790.751311] usbcore: registered new interface driver cdc_acm
>> > [  790.751314] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
>> >
>>
>> Hmm I had them both connected. Will poke around a bit more. Are there any jumper settings that affect this or anything?
>>
>> > _______________________________________________
>> > eLua-dev mailing list
>> > [hidden email]
>> > https://lists.berlios.de/mailman/listinfo/elua-dev
>>
>>
>> _______________________________________________
>> eLua-dev mailing list
>> [hidden email]
>> https://lists.berlios.de/mailman/listinfo/elua-dev
>
>
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev