-
-
Notifications
You must be signed in to change notification settings - Fork 283
ww21.4 Intermediate Release #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adding analogWriteResolution and analogReadResolution Signed-off-by: Dan O'Donovan <[email protected]> Signed-off-by: David Hunt <[email protected]>
Author: Dan O'Donovan <[email protected]> Date: Fri May 15 14:46:08 2015 +0100 Framework code extracted from the following commit ID in Intel's thunderdome git repo: 8b198659675cd820072bdeb00d0c5de87c6f6ee2 This brings the necessary library code into the source tree, but not yet integrated in the Arduino run-time environment (to follow shortly). Signed-off-by: Dan O'Donovan <[email protected]> Signed-off-by: David Hunt <[email protected]>
Intial release of serial functionality, Serial.write, print, println, read Also added files required, Ringbuffer (not used yet), Print, etc. Also some small changes to make Intel toolchain work, still more work needed. Signed-off-by: David Hunt <[email protected]>
A first draft for the following functions: * delay() * millis(); * micros(); Not yet implemented: * delayMicroseconds. Author: Bogdan Pricop <[email protected]> Signed-off-by: Bogdan Pricop <[email protected]> Signed-off-by: David Hunt <[email protected]>
Interrupt handling - add hw context saving * Disable instruction cache (we don't need it at this stage) * Setup automatic (hardware) context saving feature for non-fast interrupts. * Set optimization to none (-O0) in Makefile. build: Eliminating compiler warnings Fix interrupt handling bug Issue: A simple blink sketch having a 10 ms delay between blinks crashed after a few seconds. It looks like the stack got corrupted. Root cause: The generic assembly hardware ISR, "_do_isr", was not properly written; the "sp" was not properly handled. Solution: Replace the assembly hardware ISR with a C function having "__attribute__((interrupt("ilink")))" Note: We need this generic hardware ISR because the IVT is in flash and we cannot change it at runtime. Allocating more SRAM to ARC (syncing with latest Thunderdome mem allocation) build: Removing sdata section declaration from linker scripts ARC doesn't support an SDATA section bigger than 1024 bytes, and we overflow this too easily when we link in code that hasn't been compiled with the -mno-sdata compiler flag. So we will ensure that we only use code compiled with -mno-sdata (including standard C lib) and we remove this section declaration to weed out any exceptions to this. In other words, if we link any code that tries to use the sdata section, we will see a linker error. build: Adding HEAP section Adding heap section with start/end marker symbols to satisfy malloc() and friends Signed-off-by: David Hunt <[email protected]>
final cleanup before push. no functional changes.
small cleanup around interrupt init code. Signed-off-by: David Hunt <[email protected]>
* Fix delay() issue Issue: If value of microsecond is Timer0 limit, arcv2_timer0_count_get() microseconds condition will always be true, spinning for ever. The main issue is that the time between 2 consecutive readings of COUNT0 register is around 90 ticks and the Timer may overflow before the next reafing of COUNT0 if last values read > LIMIT - 90. Fix: Take in consideration the number of overflows. If TIMER0 overflows just leave the loop (even if COUNT0 < microseconds) * Restructure a bit arcv2_timer0_enable() function in order to reflect the procedure described in chapter 3.3.76.1 of DesignWare ARCv2 ISA Programmer's Reference Manual. Make sure Timer0 initialisation clears the counter register as well. * code review - added yield via hooks.c * added back in strip stage when building * Remove unused code in os.h, os_types.h and pf_init.h * Uncomment call to yield() from delay() Arduino function; yield() is added for sake of compatibility. * Remove dead code from timer0 init function. * Commented out enable instruction cache * Added Copyright header to wiring.c * Setup automatic (hardware) context saving feature for non-fast interrupts * Serial Communication API Initial checkin of Serial.read() and Serial.write() using header pins 0 and 1 * Eliminated some compiler warnings. Signed-off-by: David Hunt <[email protected]>
Cleaning up after code reviews and validation of build. Signed-off-by: David Hunt <[email protected]>
You can update the pull request with new commits by updating your master branch |
Is this ready to be reviewed? |
Is this in pair with this PR? https://github.com/01org/Arduino.json/pull/1 |
It might not work if it's in pair with this PR: #4 |
@calvinatintel ready for cherry-pick... let's see if compiles |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Work in progress.
Added cfw, basic serial funcs (read() write() )
Arc init code, interrupt code, timer code.