Open advancedwebdeveloper opened 3 years ago
@barafael , did you plan to add an explanation of the purpose of the demos? Are you experimenting with the generation of various forms of output signals?
Maybe hard-coding the bits for "jingle bells" song, closer to the New Year, would be vibrant?
Try checking out the branch rust-pac as mentioned in the readme :) I don't think I will fix the master branch, don't even remember how I got there. I should probably just merge rust-pac branch.
Re: "jingle bells": I extended this project to take frequencies over i2c, so that would be simple to do :) good idea.
I merged into master, should work now
oceanfish81@gollvm:~/Desktop$ git clone --single-branch --branch rust-pac https://github.com/barafael/rust-sipeed-longan-DAC longan_dac_rust-pac Cloning into 'longan_dac_rust-pac'... remote: Enumerating objects: 38, done. remote: Counting objects: 100% (38/38), done. remote: Compressing objects: 100% (28/28), done. remote: Total 38 (delta 10), reused 29 (delta 6), pack-reused 0 Unpacking objects: 100% (38/38), done. Checking connectivity... done.
~/Desktop/longan_dac_rust-pac$ cargo build Updating crates.io index Downloaded riscv-rt v0.6.2 Downloaded 1 crate (14.4 KB) in 1.70s Compiling semver-parser v0.7.0 Compiling proc-macro2 v0.4.30 Compiling riscv v0.5.4 Compiling unicode-xid v0.1.0 Compiling bit_field v0.9.0 Compiling rand_core v0.4.2 Compiling syn v0.15.44 Compiling nb v1.0.0 Compiling vcell v0.1.2 Compiling void v1.0.2 Compiling gd32vf103xx-hal v0.2.3 Compiling longan-nano v0.1.1 Compiling riscv-rt v0.6.2 Compiling rust-longan-dac v0.1.0 (/home/oceanfish81/Desktop/longan_dac_rust-pac) Compiling r0 v0.2.2 Compiling panic-abort v0.3.2 Compiling panic-halt v0.2.0 Compiling embedded-graphics v0.5.2 Compiling semver v0.9.0 Compiling rand_core v0.3.1 Compiling nb v0.1.3 Compiling rustc_version v0.2.3 Compiling rand v0.5.6 Compiling embedded-hal v0.2.4 Compiling bare-metal v0.2.5 Compiling cast v0.2.3 Compiling quote v0.6.13 Compiling riscv-rt-macros v0.1.6 Compiling gd32vf103-pac v0.2.0 error: linking with
riscv32-unknown-elf-ld
failed: exit code: 1 | = note: "riscv32-unknown-elf-ld" "-L" "/home/oceanfish81/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/riscv32imac-unknown-none-elf/lib" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/rust_longan_dac-851c73491d78216f.1dq6wl4x9vqslasz.rcgu.o" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/rust_longan_dac-851c73491d78216f.1pm3z79c7nk7ytyn.rcgu.o" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/rust_longan_dac-851c73491d78216f.26197xidw0qzow84.rcgu.o" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/rust_longan_dac-851c73491d78216f.2cyoechrpxkewp2m.rcgu.o" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/rust_longan_dac-851c73491d78216f.38vex13t3gzjd6w4.rcgu.o" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/rust_longan_dac-851c73491d78216f.3p7krsu2mb346mm9.rcgu.o" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/rust_longan_dac-851c73491d78216f.4n629f1e7eym4lg2.rcgu.o" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/rust_longan_dac-851c73491d78216f.5ggnhkzvv7kor6t0.rcgu.o" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/rust_longan_dac-851c73491d78216f.ktutb6yupqvq3uw.rcgu.o" "-o" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/rust_longan_dac-851c73491d78216f" "--gc-sections" "-L" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps" "-L" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/debug/deps" "-L" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/build/rust-longan-dac-ad87f2b63f3399bd/out" "-L" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/build/gd32vf103xx-hal-072470ce25380e32/out" "-L" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/build/riscv-50ecf700bc5ead16/out" "-L" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/build/longan-nano-430876beb173c6a1/out" "-L" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/build/riscv-rt-02bf3cd650071c2e/out" "-L" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/build/riscv-rt-02bf3cd650071c2e/out" "-L" "/home/oceanfish81/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/riscv32imac-unknown-none-elf/lib" "-Bstatic" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/libriscv_rt-93eb275a7743fd36.rlib" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/libr0-c85b5ab54aceb5f9.rlib" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/libgd32vf103xx_hal-1680e7885a8a1190.rlib" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/libcast-9812cda0f99b47a2.rlib" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/libembedded_hal-7eefa69faff2c8b3.rlib" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/libvoid-a6a4a838ac2f6eef.rlib" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/libnb-2346178da369cec7.rlib" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/libnb-ff11b26417734117.rlib" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/libgd32vf103_pac-eadc9eb92b7886cf.rlib" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/libvcell-1002245d1d075441.rlib" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/libriscv-8e577a7ab5e5e97b.rlib" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/libbit_field-b0ec6a30cad97e7c.rlib" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/libbare_metal-34e19f23cded4312.rlib" "--start-group" "/home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/libpanic_halt-c9bd1c6fdfabcb3d.rlib" "/home/oceanfish81/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/riscv32imac-unknown-none-elf/lib/librustc_std_workspace_core-1bd0d3673780d693.rlib" "/home/oceanfish81/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/riscv32imac-unknown-none-elf/lib/libcore-5aec724f1f867fb1.rlib" "--end-group" "/home/oceanfish81/.rustup/toolchains/nightly-i686-unknown-linux-gnu/lib/rustlib/riscv32imac-unknown-none-elf/lib/libcompiler_builtins-deaf2d068ddf18c0.rlib" "-Tmemory.x" "-Tlink.x" "-Bdynamic" = note: riscv32-unknown-elf-ld: /home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/rust_longan_dac-851c73491d78216f section.text.dummy' will not fit in region
FLASH' riscv32-unknown-elf-ld: /home/oceanfish81/Desktop/longan_dac_rust-pac/target/riscv32imac-unknown-none-elf/debug/deps/rust_longan_dac-851c73491d78216f section.stack' will not fit in region
RAM' riscv32-unknown-elf-ld: regionFLASH' overflowed by 134152192 bytes riscv32-unknown-elf-ld: region
RAM' overflowed by 536870912 byteserror: aborting due to previous error
error: could not compile
rust-longan-dac
In case if that would be of help: the file ~/.cargo/config contained the following:
On a contrary - I can't compile your example, on the "master" branch:
But once I re-create my ~/.cargo/config, with the very same content - Cargo builds the project successfully: