Conversation
|
The AES was there because of the long split between what shall be on device and on client? it came down to purpose, for standalone desfire support it is needed. but the standalone mode hasn't gotten some real love for awhile now |
|
But I miss the uart-setspeed, since I use it in my fork.. |
|
while i don't love losing flexibility for users to implement standalone modes and do as they wish, i don't think AES will contribute to that mode greatly at this time. the code is in the history so it can always be recalled. legic stuff. fine it just moved it could be moved back if someone needed it. the uart stuff appears minor, but should be verified with testing on all OS. but i know many will disagree with me on leaving "dead" code. |
|
Correct me if I'm wrong but don't compilers remove "unused" functions nowdays? I mentioned in another thread that maybe all @micolous ideas of refactoring should go into a new branch, instead of Master branch. If the branch "libpm3" becomes popular we can have a discussion about replacing pm3 master with it. |
|
i agree that at some point @micolous ideas should be split to a new branch. |
|
besides removing unused code... and removing of uart-setspeed. |
|
or why not a libpm3 repo? |
|
never say never! ;) there are many things in your fork that will be useful to have in the master. and i think we will have to have more discussion around how @micolous sees his code split. adding a branch could make merging it in the future more complicated if there are lots of other changes at the same time... (but it may be safer for the master branch) making a new repo would make merging the changes even more difficult. and unless the plan is to ultimately merge it i think it kind of breaks his hope that ongoing improvements get implemented in a way that works with his new form... |
|
I see no reason for a libpm3 should be merged anyway? It would live its own life. As for me, I would like to see the PM3 Master to be stable. This lib-idea is a development track, which would fit better in its own repo. Basically what I'm saying Im lazy, I don't want to spend time fixing bugs that will come from these changes since this libpm3 are of no use for me. Speaking personally. |
|
let's continue on #334 :) |
|
@micolous can you add back in the uart_set_speed and uart_get_speed for this pull request? Thanks! |
|
I'll add it back in, but I will note that the USB interface exposed by |
|
Ooh, need to revert some more stuff |
- Adds documentation to the uart API.
- Fixes a buffer overflow issue in `uart_receive`, where the maximum parameter was ignored.
- Splits the maximum length and bytes recieved variables in `uart_receive`.
- Downsizes the receive buffer to the minimum required, saving 16MiB of RAM at runtime.
- Refactors the POSIX and Win32 implementations of uart into separate files.
- Removes the unused `uart_{get,set}_parity` functions, which were not implemented on Win32.
|
Per discussion in #334, I have reverted the deletion of AES related code. This PR now only contains code for the uart refactor/cleanup. |
|
I second the merge of this. Great work giving some love to this part of the code! |
|
It looks good but I have not had time to flash it and test any commands yet. Has anyone else? |
|
Same with me. Code rewiewed and should be OK. I may find some time tonight to compile and test. |
|
@micolous |
|
I am getting warnings on Kali Linux: This should be fixed. |
|
Hmm. I don't remember seeing those warnings before but I also don't see where his changes caused them... |
|
We had |
|
Yes, now I see it. Sorry. |
|
ok so add at line 22 (flasher.c): and change sleep(1); to msleep(1000); |
|
once i make those changes windows and ubuntu appears to work fine. (ran a few simple lf search && hf search tests) |
msleep instead of sleep need unistd.h
|
i hope no one is offended i took the initiative and fixed the linux warnings. i tested and flashed on mingw and ubuntu 14.04 (but did not test on osx) |
|
about the "what goes were" it is quite simple.
Would benefit from another ticketAgain about AES haven't seen the code but there is anoter thing to consider : ARM7TDMI's brother AT91SAM7S-EK revealed an hidden crypto hardware engine in fine possible to activate (just a driver to make and some translation between adresses of real model doc, if anything). So the "Crypto Engine No" is a lie on hardware specs. This is old news for quite old MCU so can't say if it's really implementable as easy as it seems. |
This is part of a series of improvements planned for Issue #334.
Removed the AES implementation fromarmsrc, as it is not used. The version inclientremains.Movedlegic_prng.*fromcommontoarmsrc, as it is never used by theclient.uart_receive. It would ignore thepbtRxparameter and just write as much as it could.While this is a pretty large patch, most of it is moving around or deleting existing code.