librelist archives

« back to archive

[technomancy/tmk_keyboard] fix for reset a-star atreus

[technomancy/tmk_keyboard] fix for reset a-star atreus

From:
eniotna
Date:
2015-02-25 @ 08:18
Hello,

I tested a fix on the a-star atreus and "on mine, it works!".

So I opened a PR, https://github.com/technomancy/tmk_keyboard/pull/1

I admit it's a shot in the dark because I do not understand what is
actually done.
But at least, now I can reset using a key so I can close my keyboard :D

On the `why this code` specifically?
I looked at the git history on the atreus branch and noticed this snippet
not present on the `bootloader` function defined in `keymap_common.c`.
Adding it back makes it somehow ok for the reset.

Also, I have no teensy atreus so I cannot test for this one.
As the commit on the code I added suggested it was only for a-star, I added
pre-processor notation to compile the code on non teensy architecture.

If someone:
- had some explanation as to why it works.
- could test on teensy
- could test on a-star too

this would be great!

Cheers,

tony / @ardumont

Re: [technomancy/tmk_keyboard] fix for reset a-star atreus

From:
eniotna
Date:
2015-03-03 @ 15:14
Hello,

I updated the issue on github but forgot to update this thread.

Here is an extract:

```txt
So, after some investigation, I learned some things.

a-star board <https://www.pololu.com/docs/0J61/9> is based on Caterina
bootloader.
Digging into its code, I found the reference names

<https://github.com/pololu/a-star/blob/c0fd46922b9a7aafd295298f17411d87832969ae/bootloaders/caterina/Caterina.c#L106-L107>
to the hardcoded references in this PR.

0x0800 is bootKeyPtr so it's the memory address which stores a boot key
value.
0x7777 is bootKey, it's a default value.

And those values do indeed influence on the path to take during the
bootloader jump <https://www.pololu.com/picture/view/0J5267>.

I guess now remains to find out how to do the equivalent for the teensy
board.
```

Still, if someone:
- could test on another a-star too
- could test on a teensy (I now believe it won't work but just to be sure
it's still ok).

This would still be great :D

Cheers,

tony / @ardumont

On Wed, Feb 25, 2015 at 9:18 AM, eniotna <eniotna.t@gmail.com> wrote:

> Hello,
>
> I tested a fix on the a-star atreus and "on mine, it works!".
>
> So I opened a PR, https://github.com/technomancy/tmk_keyboard/pull/1
>
> I admit it's a shot in the dark because I do not understand what is
> actually done.
> But at least, now I can reset using a key so I can close my keyboard :D
>
> On the `why this code` specifically?
> I looked at the git history on the atreus branch and noticed this snippet
> not present on the `bootloader` function defined in `keymap_common.c`.
> Adding it back makes it somehow ok for the reset.
>
> Also, I have no teensy atreus so I cannot test for this one.
> As the commit on the code I added suggested it was only for a-star, I
> added pre-processor notation to compile the code on non teensy architecture.
>
> If someone:
> - had some explanation as to why it works.
> - could test on teensy
> - could test on a-star too
>
> this would be great!
>
> Cheers,
>
> tony / @ardumont
>

Re: [atreus] Re: [technomancy/tmk_keyboard] fix for reset a-star atreus

From:
Jesse Vincent
Date:
2015-03-03 @ 16:49
Coming in a little late here, I've definitely had reset bootloader issues
on arduino variants. Some research I did on the topic is here:

http://blog.fsck.com/2014/08/how-to-reboot-an-arduino-leonardo-micro-into-the-bootloader.html

You'll also want to read up on the BOOTRST fuse and the HWB pin on the
Atmega32U4.  (You can find that here:
http://www.atmel.com/devices/atmega32u4.aspx)

On Tue, Mar 3, 2015 at 7:14 AM, eniotna <eniotna.t@gmail.com> wrote:

> Hello,
>
> I updated the issue on github but forgot to update this thread.
>
> Here is an extract:
>
> ```txt
> So, after some investigation, I learned some things.
>
> a-star board <https://www.pololu.com/docs/0J61/9> is based on Caterina
> bootloader.
> Digging into its code, I found the reference names
> 
<https://github.com/pololu/a-star/blob/c0fd46922b9a7aafd295298f17411d87832969ae/bootloaders/caterina/Caterina.c#L106-L107>
> to the hardcoded references in this PR.
>
> 0x0800 is bootKeyPtr so it's the memory address which stores a boot key
> value.
> 0x7777 is bootKey, it's a default value.
>
> And those values do indeed influence on the path to take during the
> bootloader jump <https://www.pololu.com/picture/view/0J5267>.
>
> I guess now remains to find out how to do the equivalent for the teensy
> board.
> ```
>
> Still, if someone:
> - could test on another a-star too
> - could test on a teensy (I now believe it won't work but just to be sure
> it's still ok).
>
> This would still be great :D
>
> Cheers,
>
> tony / @ardumont
>
> On Wed, Feb 25, 2015 at 9:18 AM, eniotna <eniotna.t@gmail.com> wrote:
>
>> Hello,
>>
>> I tested a fix on the a-star atreus and "on mine, it works!".
>>
>> So I opened a PR, https://github.com/technomancy/tmk_keyboard/pull/1
>>
>> I admit it's a shot in the dark because I do not understand what is
>> actually done.
>> But at least, now I can reset using a key so I can close my keyboard :D
>>
>> On the `why this code` specifically?
>> I looked at the git history on the atreus branch and noticed this snippet
>> not present on the `bootloader` function defined in `keymap_common.c`.
>> Adding it back makes it somehow ok for the reset.
>>
>> Also, I have no teensy atreus so I cannot test for this one.
>> As the commit on the code I added suggested it was only for a-star, I
>> added pre-processor notation to compile the code on non teensy architecture.
>>
>> If someone:
>> - had some explanation as to why it works.
>> - could test on teensy
>> - could test on a-star too
>>
>> this would be great!
>>
>> Cheers,
>>
>> tony / @ardumont
>>
>
>

Re: [atreus] Re: [technomancy/tmk_keyboard] fix for reset a-star atreus

From:
eniotna
Date:
2015-03-03 @ 20:10
Thanks a lot Jesse for the links!

Will read them soon.

Cheers,

tony / @ardumont

On Tue, Mar 3, 2015 at 5:49 PM, Jesse Vincent <jesse@keyboard.io> wrote:

> Coming in a little late here, I've definitely had reset bootloader issues
> on arduino variants. Some research I did on the topic is here:
> 
http://blog.fsck.com/2014/08/how-to-reboot-an-arduino-leonardo-micro-into-the-bootloader.html
>
> You'll also want to read up on the BOOTRST fuse and the HWB pin on the
> Atmega32U4.  (You can find that here:
> http://www.atmel.com/devices/atmega32u4.aspx)
>
> On Tue, Mar 3, 2015 at 7:14 AM, eniotna <eniotna.t@gmail.com> wrote:
>
>> Hello,
>>
>> I updated the issue on gi thub but forgot to update this thread.
>>
>> Here is an extract:
>>
>> ```txt
>> So, after some investigation, I learned some things.
>>
>> a-star board <https://www.pololu.com/docs/0J61/9> is based on Caterina
>> bootloader.
>> Digging into its code, I found the reference names
>> 
<https://github.com/pololu/a-star/blob/c0fd46922b9a7aafd295298f17411d87832969ae/bootloaders/caterina/Caterina.c#L106-L107>
>> to the hardcoded references in this PR.
>>
>> 0x0800 is bootKeyPtr so it's the memory address which stores a boot key
>> value.
>> 0x7777 is bootKey, it's a default value.
>>
>> And those values do indeed influence on the path to take during the
>> bootloader jump <https://www.pololu.com/picture/view/0J5267>.
>>
>> I guess now remains to find out how to do the equivalent for the teensy
>> board.
>> ```
>>
>> Still, if someone:
>> - could test on another a-star too
>> - could test on a teensy (I now believe it won't work but just to be sure
>> it's still ok).
>>
>> This would still be great :D
>>
>> Cheers,
>>
>> tony / @ardumont
>>
>> On Wed, Feb 25, 2015 at 9:18 AM, eniotna <eniotna.t@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I tested a fix on the a-star atreus and "on mine, it works!".
>>>
>>> So I opened a PR, https://github.com/technomancy/tmk_keyboard/pull/1
>>>
>>> I admit it's a shot in the dark because I do not understand what is
>>> actually done.
>>> But at least, now I can reset using a key so I can close my keyboard :D
>>>
>>> On the `why this code` specifically?
>>> I looked at the git history on the atreus branch and noticed this
>>> snippet not present on the `bootloader` function defined in
>>> `keymap_common.c`.
>>>
>>> *Adding it back makes it somehow ok for the reset.*
>>> Also, I have no teensy atreus so I cannot test for this one.
>>> As the commit on the code I added suggested it was only for a-star, I
>>> added pre-processor notation to compile the code on non teensy architecture.
>>>
>>> If someone:
>>> - had some explanation as to why it works.
>>> - could test on teensy
>>> - could test on a-star too
>>>
>>> this would be great!
>>>
>>> Cheers,
>>>
>>> tony / @ardumont
>>>
>>
>>
>