-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document how to build a Pico-W AtomVM binary Also bump the load address of applications as the binary is larger Signed-off-by: Paul Guyot <[email protected]>
- Loading branch information
Showing
18 changed files
with
276 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
% | ||
% This file is part of AtomVM. | ||
% | ||
% Copyright 2023 Paul Guyot <[email protected]> | ||
% | ||
% Licensed under the Apache License, Version 2.0 (the "License"); | ||
% you may not use this file except in compliance with the License. | ||
% You may obtain a copy of the License at | ||
% | ||
% http://www.apache.org/licenses/LICENSE-2.0 | ||
% | ||
% Unless required by applicable law or agreed to in writing, software | ||
% distributed under the License is distributed on an "AS IS" BASIS, | ||
% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
% See the License for the specific language governing permissions and | ||
% limitations under the License. | ||
% | ||
% SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later | ||
% | ||
|
||
-module(picow_blink). | ||
-export([start/0]). | ||
|
||
% 0 is CYW43 GPIO for on-board led | ||
% This code will not work on Pico | ||
-define(GPIO_NUM, 0). | ||
|
||
start() -> | ||
loop(0). | ||
|
||
loop(N) -> | ||
pico:cyw43_arch_gpio_put(?GPIO_NUM, N), | ||
timer:sleep(1000), | ||
loop((N + 1) rem 2). |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
/* | ||
* This file is part of AtomVM. | ||
* | ||
* Copyright 2023 Paul Guyot <[email protected]> | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later | ||
*/ | ||
|
||
#ifndef _LWIPOPTS_H | ||
#define _LWIPOPTS_H | ||
|
||
// See https://www.nongnu.org/lwip/2_1_x/group__lwip__opts.html | ||
|
||
#define NO_SYS 1 | ||
#define LWIP_SOCKET 0 | ||
#if PICO_CYW43_ARCH_POLL | ||
#define MEM_LIBC_MALLOC 1 | ||
#else | ||
// MEM_LIBC_MALLOC is incompatible with non polling versions | ||
#define MEM_LIBC_MALLOC 0 | ||
#endif | ||
#define MEM_ALIGNMENT 4 | ||
#define MEM_SIZE 4000 | ||
#define MEMP_NUM_TCP_SEG 32 | ||
#define MEMP_NUM_ARP_QUEUE 10 | ||
#define PBUF_POOL_SIZE 24 | ||
#define LWIP_ARP 1 | ||
#define LWIP_ETHERNET 1 | ||
#define LWIP_ICMP 1 | ||
#define LWIP_RAW 1 | ||
#define TCP_WND (8 * TCP_MSS) | ||
#define TCP_MSS 1460 | ||
#define TCP_SND_BUF (8 * TCP_MSS) | ||
#define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1)) / (TCP_MSS)) | ||
#define LWIP_NETIF_STATUS_CALLBACK 1 | ||
#define LWIP_NETIF_LINK_CALLBACK 1 | ||
#define LWIP_NETIF_HOSTNAME 1 | ||
#define LWIP_NETCONN 0 | ||
#define MEM_STATS 0 | ||
#define SYS_STATS 0 | ||
#define MEMP_STATS 0 | ||
#define LINK_STATS 0 | ||
// #define ETH_PAD_SIZE 2 | ||
#define LWIP_CHKSUM_ALGORITHM 3 | ||
#define LWIP_DHCP 1 | ||
#define LWIP_IPV4 1 | ||
#define LWIP_TCP 1 | ||
#define LWIP_UDP 1 | ||
#define LWIP_DNS 1 | ||
#define LWIP_TCP_KEEPALIVE 1 | ||
#define LWIP_NETIF_TX_SINGLE_PBUF 1 | ||
#define DHCP_DOES_ARP_CHECK 0 | ||
#define LWIP_DHCP_DOES_ACD_CHECK 0 | ||
|
||
#ifndef NDEBUG | ||
#define LWIP_DEBUG 1 | ||
#define LWIP_STATS 1 | ||
#define LWIP_STATS_DISPLAY 1 | ||
#endif | ||
|
||
#define ETHARP_DEBUG LWIP_DBG_OFF | ||
#define NETIF_DEBUG LWIP_DBG_OFF | ||
#define PBUF_DEBUG LWIP_DBG_OFF | ||
#define API_LIB_DEBUG LWIP_DBG_OFF | ||
#define API_MSG_DEBUG LWIP_DBG_OFF | ||
#define SOCKETS_DEBUG LWIP_DBG_OFF | ||
#define ICMP_DEBUG LWIP_DBG_OFF | ||
#define INET_DEBUG LWIP_DBG_OFF | ||
#define IP_DEBUG LWIP_DBG_OFF | ||
#define IP_REASS_DEBUG LWIP_DBG_OFF | ||
#define RAW_DEBUG LWIP_DBG_OFF | ||
#define MEM_DEBUG LWIP_DBG_OFF | ||
#define MEMP_DEBUG LWIP_DBG_OFF | ||
#define SYS_DEBUG LWIP_DBG_OFF | ||
#define TCP_DEBUG LWIP_DBG_OFF | ||
#define TCP_INPUT_DEBUG LWIP_DBG_OFF | ||
#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF | ||
#define TCP_RTO_DEBUG LWIP_DBG_OFF | ||
#define TCP_CWND_DEBUG LWIP_DBG_OFF | ||
#define TCP_WND_DEBUG LWIP_DBG_OFF | ||
#define TCP_FR_DEBUG LWIP_DBG_OFF | ||
#define TCP_QLEN_DEBUG LWIP_DBG_OFF | ||
#define TCP_RST_DEBUG LWIP_DBG_OFF | ||
#define UDP_DEBUG LWIP_DBG_OFF | ||
#define TCPIP_DEBUG LWIP_DBG_OFF | ||
#define PPP_DEBUG LWIP_DBG_OFF | ||
#define SLIP_DEBUG LWIP_DBG_OFF | ||
#define DHCP_DEBUG LWIP_DBG_OFF | ||
|
||
#endif /* __LWIPOPTS_H__ */ |
Oops, something went wrong.