Skip to content

Commit ec2dba5

Browse files
committed
Forward port changes from v0.6 release branch
Merge mostly chores from release-0.6 branch, but also PR for setting pico_w unique dhcp_hostname or configured hostname (#1563).
2 parents f42fb23 + 9c1375c commit ec2dba5

File tree

6 files changed

+131
-52
lines changed

6 files changed

+131
-52
lines changed

.github/workflows/build-linux-artifacts.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
path: build_tests
190190

191191
- name: Set up QEMU
192-
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
192+
uses: docker/setup-qemu-action@v3
193193

194194
- name: Build AtomVM using docker
195195
timeout-minutes: 15

.github/workflows/esp32-mkimage.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ concurrency:
3737

3838
jobs:
3939
esp32-release:
40-
runs-on: ubuntu-22.04
40+
runs-on: ubuntu-24.04
4141
container: espressif/idf:v${{ matrix.idf-version }}
4242

4343
strategy:
@@ -58,7 +58,7 @@ jobs:
5858
CXX: ${{ matrix.cxx }}
5959
CFLAGS: ${{ matrix.cflags }}
6060
CXXFLAGS: ${{ matrix.cflags }}
61-
ImageOS: "ubuntu22"
61+
ImageOS: "ubuntu24"
6262

6363
steps:
6464
- name: Checkout repo

.github/workflows/esp32-simtest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
"esp32h2",
8181
"esp32p4",
8282
]
83-
idf-version: ${{ ((contains(github.event.head_commit.message, 'full_sim_test')||contains(github.event.pull_request.title, 'full_sim_test')) && fromJSON('["v5.1.6", "v5.2.5", "v5.3.3", "v5.4.1"]')) || fromJSON('["v5.3.3"]') }}
83+
idf-version: ${{ ((contains(github.event.head_commit.message, 'full_sim_test')||contains(github.event.pull_request.title, 'full_sim_test')) && fromJSON('["v5.1.6", "v5.2.5", "v5.3.3", "v5.4.1"]')) || fromJSON('["v5.4.1"]') }}
8484
exclude:
8585
- esp-idf-target: "esp32p4"
8686
idf-version: "v5.1.6"

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ with nodejs and emscripten)
7676
- Added `uart:read/2` with a timeout parameter.
7777
- Missing `erlang:is_function/2` BIF
7878
- Added `erlang:is_record/2`
79+
- Added ability to set per-interface `dhcp_hostname` on Pico W if present in config.
7980

8081
### Fixed
8182

@@ -130,10 +131,15 @@ memory error
130131
- Do not abort when an out of memory happens while loading a literal value
131132
- Fixed potential memory corruption when handling integer immediates that are stored as boxed
132133
integer (this never happens with integers < 28 bits)
134+
- Correctly set Pico-W unique dhcp hostname when using the default, previously all rp2040 devices
135+
used the same "PicoW" dhcp hostname, causing collisions when multiple rp2040 are on the same
136+
network. (See issue #1094)
133137

134138
### Changed
135139

136140
- ESP32 UART driver no longer aborts because of badargs in configuration, instead raising an error
141+
- ESP32: `v0.6.6` uses esp-idf v5.4.1 for pre-built images and `v5.4.x` is the suggested release
142+
also for custom builds
137143

138144
## [0.6.5] - 2024-10-15
139145

src/libAtomVM/opcodesswitch.h

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2706,7 +2706,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
27062706
break;
27072707
}
27082708

2709-
//TODO: implement wait/1
27102709
case OP_WAIT: {
27112710
uint32_t label;
27122711
DECODE_LABEL(label, pc)
@@ -2723,7 +2722,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
27232722
break;
27242723
}
27252724

2726-
//TODO: implement wait_timeout/2
27272725
case OP_WAIT_TIMEOUT: {
27282726
#ifdef IMPL_EXECUTE_LOOP
27292727
// PC for wait_timeout_trap_handler, just before label
@@ -3037,7 +3035,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
30373035
#ifdef IMPL_EXECUTE_LOOP
30383036
TRACE("is_number/2, label=%i, arg1=%lx\n", label, arg1);
30393037

3040-
//TODO: check for floats too
30413038
if (!term_is_number(arg1)) {
30423039
pc = mod->labels[label];
30433040
}
@@ -3262,7 +3259,8 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
32623259
#ifdef IMPL_EXECUTE_LOOP
32633260
TRACE("test_arity/2, label=%i, arg1=%lx\n", label, arg1);
32643261

3265-
if (!(term_is_tuple(arg1) && (uint32_t) term_get_tuple_arity(arg1) == arity)) {
3262+
assert(term_is_tuple(arg1));
3263+
if ((uint32_t) term_get_tuple_arity(arg1) != arity) {
32663264
pc = mod->labels[label];
32673265
}
32683266
#endif
@@ -3367,7 +3365,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
33673365
#endif
33683366

33693367
#ifdef IMPL_EXECUTE_LOOP
3370-
//TODO: check if src_value is a tuple
33713368
if (!jump_to_address && ((uint32_t) arity == cmp_value)) {
33723369
jump_to_address = mod->labels[jmp_label];
33733370
}
@@ -3599,9 +3596,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
35993596
TRACE("if_end/0\n");
36003597

36013598
#ifdef IMPL_EXECUTE_LOOP
3602-
x_regs[0] = ERROR_ATOM;
3603-
x_regs[1] = IF_CLAUSE_ATOM;
3604-
36053599
RAISE_ERROR(IF_CLAUSE_ATOM);
36063600
#endif
36073601
break;
@@ -3826,7 +3820,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
38263820

38273821
#ifdef IMPL_EXECUTE_LOOP
38283822
term catch_term = term_from_catch_label(mod->module_index, label);
3829-
//TODO: here just write to y registers is enough
38303823
WRITE_REGISTER(dreg, catch_term);
38313824
#endif
38323825
break;
@@ -3839,7 +3832,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
38393832
TRACE("try_end/1, reg=%c%i\n", T_DEST_REG(dreg));
38403833

38413834
#ifdef IMPL_EXECUTE_LOOP
3842-
//TODO: here just write to y registers is enough
38433835
WRITE_REGISTER(dreg, term_nil());
38443836
#endif
38453837
break;
@@ -3920,7 +3912,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
39203912

39213913
#ifdef IMPL_EXECUTE_LOOP
39223914
term catch_term = term_from_catch_label(mod->module_index, label);
3923-
// TODO: here just write to y registers is enough
39243915
WRITE_REGISTER(dreg, catch_term);
39253916
#endif
39263917
break;
@@ -3933,7 +3924,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
39333924
TRACE("catch_end/1, reg=%c%i\n", T_DEST_REG(dreg));
39343925

39353926
#ifdef IMPL_EXECUTE_LOOP
3936-
// TODO: here just write to y registers is enough
39373927
WRITE_REGISTER(dreg, term_nil());
39383928
// C.f. https://www.erlang.org/doc/reference_manual/expressions.html#catch-and-throw
39393929
switch (term_to_atom_index(x_regs[0])) {
@@ -5537,7 +5527,7 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
55375527
DECODE_COMPACT_TERM(arity_term, pc)
55385528

55395529
#ifdef IMPL_EXECUTE_LOOP
5540-
TRACE("is_function2/3, label=%i, arg1=%lx, arity=%i\n", label, arg1, arity);
5530+
TRACE("is_function2/3, label=%i, arg1=%lx, arity=%p\n", label, arg1, (void *) arity_term);
55415531

55425532
if (term_is_function(arg1) && term_is_integer(arity_term)) {
55435533
const term *boxed_value = term_to_const_term_ptr(arg1);
@@ -5675,7 +5665,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
56755665
break;
56765666
}
56775667

5678-
//TODO: stub, always false
56795668
case OP_IS_BITSTR: {
56805669
uint32_t label;
56815670
DECODE_LABEL(label, pc)
@@ -5698,8 +5687,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
56985687
break;
56995688
}
57005689

5701-
// TODO: This opcode is currently uncovered by tests.
5702-
// We need to implement GC bifs with arity 3, e.g. binary_part/3.
57035690
case OP_GC_BIF3: {
57045691
uint32_t fail_label;
57055692
DECODE_LABEL(fail_label, pc);
@@ -5773,7 +5760,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
57735760
}
57745761

57755762
#if MINIMUM_OTP_COMPILER_VERSION <= 23
5776-
//TODO: stub, implement recv_mark/1
57775763
//it looks like it can be safely left unimplemented
57785764
case OP_RECV_MARK: {
57795765
uint32_t label;
@@ -5784,7 +5770,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
57845770
break;
57855771
}
57865772

5787-
//TODO: stub, implement recv_set/1
57885773
//it looks like it can be safely left unimplemented
57895774
case OP_RECV_SET: {
57905775
uint32_t label;

0 commit comments

Comments
 (0)