Skip to content
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

Upstream changes and fixes #204

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e08be6b
Add macros like PINOP to set pin configuration and read pin state
stevenj Jun 9, 2018
f281642
Add a way to allow a GPIO to hold the bootloader from running the app.
stevenj Jun 9, 2018
e06e6c7
Change pinconfig to not use magic numbers.
stevenj Jun 11, 2018
d6071d9
Make PINCFG macro more flexible (can read or write)
stevenj Jun 11, 2018
b908e9c
Merge remote-tracking branch 'upstream/master'
stevenj Jun 19, 2018
a714932
Document the hold GPIO functionality
stevenj Jun 19, 2018
3ff6658
Merge pull request #73 from adafruit/master
mmoskal May 22, 2019
fbd9bd1
Merge pull request #75 from adafruit/master
mmoskal Jun 23, 2019
771f437
Add config for ILI9341 screen
mmoskal Aug 27, 2019
7b6f05e
Allow for 320x240 screens
mmoskal Aug 27, 2019
903c406
added updated robohatmm1 by robotics masters bootloader files. NOTE:…
wallarug Oct 4, 2019
765e915
Merge pull request #77 from robotics-masters/master
mmoskal Oct 4, 2019
84c32dc
Make the FAT media descriptor match everywhere.
piquan Oct 28, 2019
b68f3a1
Fix endianness issues on USB mass storage CBW and CSW signatures.
piquan Oct 28, 2019
5610e7c
Merge pull request #81 from piquan/microsoft
mmoskal Nov 2, 2019
c08c68a
Add configuration for PewPew M4 board
deshipu Dec 26, 2019
bf38448
Update SVD
mvniekerk Dec 29, 2019
15fa44f
Bitwidth fix
mvniekerk Dec 31, 2019
94e917f
Merge pull request #84 from pewpew-game/pewpew-m4
mmoskal Dec 31, 2019
df89a1f
Merge pull request #85 from mvniekerk/atsame54
mmoskal Dec 31, 2019
30d153e
Delete boards/robohatmm1_m0 directory
wallarug Apr 23, 2021
3294dae
Merge pull request #99 from wallarug/patch-1
mmoskal Apr 23, 2021
be9a2c4
Use Buffer.alloc() - fixes #100
mmoskal Jun 10, 2021
dd415d5
Auto-update tasks.json
mmoskal Jun 10, 2021
b393cb1
fix #103 - gcc warnings
mmoskal Jan 20, 2022
e8e41dc
Fix Makefile.user reference in README.md
erikvanzijst Aug 18, 2022
f4c13d5
Merge pull request #47 from stevenj/master
mmoskal Aug 19, 2022
b0b37f7
Merge pull request #106 from erikvanzijst/erik/makefile-user-readme
mmoskal Aug 19, 2022
a78c217
Microsoft mandatory file
microsoft-github-policy-service[bot] Aug 19, 2022
a679dbe
Merge pull request #107 from microsoft/users/GitHubPolicyService/1fa2…
mmoskal Aug 19, 2022
569c1d8
fix WS (1->2 by 48Mhz)
xeno27 Jun 6, 2023
4c90034
Merge pull request #113 from xeno27/master
mmoskal Jun 6, 2023
9feaa33
Merge remote-tracking branch 'microsoft/master'
pesco Jul 22, 2023
555468b
specify that we need GNU make
pesco Jul 23, 2023
27d7527
fix DISPLAY_CFG0 for PewPew M4
pesco Aug 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ node_modules
scripts/clean-ifaces/*.plist
.vscode/c_cpp_properties.json
TAGS

**/.DS_STORE
**/*.iml
**/.idea
13 changes: 10 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"version": "2.0.0",
"command": "make",
"isShellCommand": true,
"args": [],
"showOutput": "always"
"tasks": [
{
"label": "make",
"type": "shell",
"command": "make",
"problemMatcher": [],
"group": "build"
}
]
}
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ to temporarily turn off the protection. In gdb the command is:

### Requirements

* `make` and an Unix environment
* GNU `make` and a Unix environment
* `node`.js in path (optional)
* `arm-none-eabi-gcc` in the path (the one coming with Yotta will do just fine). You can get the latest version from ARM: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads
* `openocd` - you can use the one coming with Arduino (after your install the M0 board support)
Expand Down Expand Up @@ -188,6 +188,30 @@ Thus, it's best to set the USB ID to one for which there are no drivers.

The bootloader sits at 0x00000000, and the application starts at 0x00002000 (SAMD21) or 0x00004000 (SAMD51).

#### Bootloader Hold Switch

A Board can be configured to sense the state of a GPIO and to hold the bootloader from running an application if it is in the appropriate state. To enable this, add the following to your board configuration header file.

```C
// The Pin that will tell us to stay in the bootloader or not.
#define HOLD_PIN PIN_PA02

// Optional, define if a Pull up or pulldown is needed.
#define HOLD_PIN_PULLUP
//#define HOLD_PIN_PULLDOWN

// What is the Hold state of the GPIO, 0 or 1.
#define HOLD_STATE 1
```

Set `HOLD_PIN` to the appropriate GPIO and `HOLD_STATE` to the logic level which will hold the bootloader from running the application.

The definition of _BOTH_ `HOLD_PIN` and `HOLD_STATE` triggers the inclusion of this feature. If either of these is undefined, this feature is not enabled.

If an internal pullup/pulldown is required for the IO, it can be enabled with the _OPTIONAL_ `HOLD_PIN_PULLUP` or `HOLD_PIN_PULLDOWN` macros. If neither are defined, then no pullup/pulldown will be enabled for the io pin.

This switch is NOT dynamic. Once the bootloader has sensed this pin and decided not to run the application, then a change in this IO will not, itself, then cause the Application to run, without also resetting the board.

## Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
Expand Down
41 changes: 41 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->

## Security

Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).

If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.

## Preferred Languages

We prefer all communications to be in English.

## Policy

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->
6 changes: 6 additions & 0 deletions boards/arcade_itsybitsy_m4/ili9341.cf2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
DISPLAY_CFG0 = 0xc8
DISPLAY_CFG1 = 0x0018ff
DISPLAY_CFG2 = 50
DISPLAY_WIDTH = 320
DISPLAY_HEIGHT = 240
DISPLAY_TYPE = 9341
3 changes: 2 additions & 1 deletion boards/pewpew_m4/board_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ const uint32_t config_data[] = {
36, 0x10, // PIN_DISPLAY_DC = PA16
37, 0xa0, // DISPLAY_WIDTH = 160
38, 0x80, // DISPLAY_HEIGHT = 128
39, 0x20180, // DISPLAY_CFG0 = 0x20180
//39, 0x80, // DISPLAY_CFG0 = 0x80 (prototype)
39, 0x20180, // DISPLAY_CFG0 = 0x20180 (sold version)
40, 0x12c2d, // DISPLAY_CFG1 = 0x12c2d
41, 0x18, // DISPLAY_CFG2 = 0x18
43, 0x11, // PIN_DISPLAY_RST = PA17
Expand Down
2 changes: 0 additions & 2 deletions boards/robohatmm1_m0/board.mk

This file was deleted.

17 changes: 0 additions & 17 deletions boards/robohatmm1_m0/board_config.h

This file was deleted.

3 changes: 3 additions & 0 deletions inc/uf2.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ void system_init(void);
#define LED_TICK led_tick

#define PINOP(pin, OP) (PORT->Group[(pin) / 32].OP.reg = (1 << ((pin) % 32)))
#define PINIP(pin) (((PORT->Group[(pin) / 32].IN.reg) >> ((pin) % 32)) & 0x1)
#define PINCFG(pin) (PORT->Group[(pin) / 32].PINCFG[(pin) % 32].reg)
#define PINMUX(pin) (PORT->Group[(pin) / 32].PMUX[((pin) % 32)/2].reg)

void led_tick(void);
void led_signal(void);
Expand Down
4 changes: 2 additions & 2 deletions lib/cmsis/CMSIS/Include/core_cmFunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PSP(void)
*/
__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
{
__ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) : "sp");
__ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) : );
}


Expand Down Expand Up @@ -454,7 +454,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_MSP(void)
__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
{
// : "sp" removed from clobber list to avoid gcc 9 warning.
__ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack));
__ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) : );
}


Expand Down
Loading