diff --git a/.github/actions/setup-llgo/action.yml b/.github/actions/setup-llgo/action.yml new file mode 100644 index 0000000..32fc61c --- /dev/null +++ b/.github/actions/setup-llgo/action.yml @@ -0,0 +1,32 @@ +name: "Setup LLGO" +description: "Checkout and build LLGO from specific commit hash" +inputs: + commit-hash: + description: "Commit hash to checkout" + required: true + platform: + description: "Platform to download for" + required: false + default: "linux-amd64" +runs: + using: "composite" + steps: + - name: Setup LLGo Dependencies + uses: goplus/llgo/.github/actions/setup-deps@b25ae1b4e7c06a302d1d09eb9e9b0ad1e3a43abd + - name: Checkout LLGo Repository + uses: actions/checkout@v4 + with: + repository: goplus/llgo + ref: ${{ inputs.commit-hash }} + path: llgo-source + - name: Setup LLGO + shell: bash + run: | + echo "Setting up LLGO from commit hash ${{ inputs.commit-hash }}..." + cd llgo-source + # Install LLGO from source + bash ./install.sh + # Set LLGO_ROOT to the source directory + echo "LLGO_ROOT=$PWD" >> $GITHUB_ENV + # Verify LLGO is available + llgo version || echo "Failed to get LLGO version" diff --git a/.github/scripts/device-gen.sh b/.github/scripts/device-gen.sh new file mode 100755 index 0000000..ec55c2a --- /dev/null +++ b/.github/scripts/device-gen.sh @@ -0,0 +1,335 @@ +#!/bin/bash +set -e + +# .ld,.s current not need generate at emb/device/avr,they are in llgo + +declare_avr_config() { + name="avr" + repo="https://github.com/avr-rust/avr-mcu" + lib_path="lib/avr" + git_hash="6624554c02b237b23dc17d53e992bf54033fc228" + tasks=( + "lib/avr/packs/atmega" + "lib/avr/packs/tiny" + ) + ignore_list="avr.go avr_tiny85.go" + target="device/avr" + generator="gen-device-avr" +} + +declare_esp_config() { + name="esp" + repo="https://github.com/cmsis-svd/cmsis-svd-data" + lib_path="lib/cmsis-svd" + git_hash="05a9562ec59b87945a8d7177a4b08b7aa2f2fd58" + tasks=( + "-source=https://github.com/posborne/cmsis-svd/tree/master/data/Espressif-Community -interrupts=software lib/cmsis-svd/data/Espressif-Community/" + "-source=https://github.com/posborne/cmsis-svd/tree/master/data/Espressif -interrupts=software lib/cmsis-svd/data/Espressif/" + ) + ignore_list="" + target="device/esp" + generator="gen-device-svd" +} + +declare_nrf_config() { + name="nrf" + repo="https://github.com/NordicSemiconductor/nrfx" + lib_path="lib/nrfx" + git_hash="d779b49fc59c7a165e7da1d7cd7d57b28a059f16" + tasks=( + "-source=https://github.com/NordicSemiconductor/nrfx/tree/master/mdk lib/nrfx/mdk/" + ) + ignore_list="README.markdown" + target="device/nrf" + generator="gen-device-svd" +} + +declare_nxp_config() { + name="nxp" + repo="https://github.com/cmsis-svd/cmsis-svd-data" + lib_path="lib/cmsis-svd" + git_hash="05a9562ec59b87945a8d7177a4b08b7aa2f2fd58" + tasks=( + "-source=https://github.com/posborne/cmsis-svd/tree/master/data/NXP lib/cmsis-svd/data/NXP/" + ) + ignore_list="hardfault.go mimxrt1062_clock.go mimxrt1062_hardfault.go mimxrt1062_mpu.go" + target="device/nxp" + generator="gen-device-svd" +} + +declare_sam_config() { + name="sam" + repo="https://github.com/cmsis-svd/cmsis-svd-data" + lib_path="lib/cmsis-svd" + git_hash="05a9562ec59b87945a8d7177a4b08b7aa2f2fd58" + tasks=( + "-source=https://github.com/posborne/cmsis-svd/tree/master/data/Atmel lib/cmsis-svd/data/Atmel/" + ) + ignore_list="atsamd51x-bitfields.go atsame5x-bitfields.go" + target="device/sam" + generator="gen-device-svd" +} + +declare_sifive_config() { + name="sifive" + repo="https://github.com/cmsis-svd/cmsis-svd-data" + lib_path="lib/cmsis-svd" + git_hash="05a9562ec59b87945a8d7177a4b08b7aa2f2fd58" + tasks=( + "-source=https://github.com/posborne/cmsis-svd/tree/master/data/SiFive-Community -interrupts=software lib/cmsis-svd/data/SiFive-Community/" + ) + ignore_list="" + target="device/sifive" + generator="gen-device-svd" +} + +declare_kendryte_config() { + name="kendryte" + repo="https://github.com/cmsis-svd/cmsis-svd-data" + lib_path="lib/cmsis-svd" + git_hash="05a9562ec59b87945a8d7177a4b08b7aa2f2fd58" + tasks=( + "-source=https://github.com/posborne/cmsis-svd/tree/master/data/Kendryte-Community -interrupts=software lib/cmsis-svd/data/Kendryte-Community/" + ) + ignore_list="" + target="device/kendryte" + generator="gen-device-svd" +} + +declare_stm32_config() { + name="stm32" + repo="https://github.com/tinygo-org/stm32-svd" + lib_path="lib/stm32-svd" + git_hash="e6db8e32d5d42293a528434ec12e7f88479a8649" + tasks=( + "-source=https://github.com/tinygo-org/stm32-svd lib/stm32-svd/svd" + ) + ignore_list="" + target="device/stm32" + generator="gen-device-svd" +} + +declare_rp_config() { + name="rp" + repo="https://github.com/cmsis-svd/cmsis-svd-data" + lib_path="lib/cmsis-svd" + git_hash="05a9562ec59b87945a8d7177a4b08b7aa2f2fd58" + tasks=( + "-source=https://github.com/posborne/cmsis-svd/tree/master/data/RaspberryPi lib/cmsis-svd/data/RaspberryPi/" + ) + ignore_list="rp2040-extra.go rp2350-extra.go" + target="device/rp" + generator="gen-device-svd" +} + +declare_renesas_config() { + name="renesas" + repo="https://github.com/cmsis-svd/cmsis-svd-data" + lib_path="lib/cmsis-svd" + git_hash="05a9562ec59b87945a8d7177a4b08b7aa2f2fd58" + tasks=( + "-source=https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas lib/cmsis-svd/data/Renesas/" + ) + ignore_list="" + target="device/renesas" + generator="gen-device-svd" +} + +# List of device configuration functions +DEVICE_CONFIGS=( + "declare_avr_config" + "declare_esp_config" + "declare_nrf_config" + "declare_nxp_config" + "declare_sam_config" + "declare_sifive_config" + "declare_kendryte_config" + "declare_stm32_config" + "declare_rp_config" + "declare_renesas_config" +) + +# Generate device files from all tasks to specified directory +generate_device_files() { + local device_name="$1" + shift + local generator="${@: -2:1}" + local target_dir="${@: -1}" + # Remove generator and target_dir from args to get tasks + set -- "${@:1:$#-2}" + local tasks_array=("$@") + + echo "[$device_name] Processing ${#tasks_array[@]} tasks..." + for task in "${tasks_array[@]}"; do + echo "[$device_name] Processing task: $task" + "$generator" $task "$target_dir/" + echo "[$device_name] Generated to $target_dir" + done + echo "[$device_name] All tasks processed successfully" + + # Format Go files in target directory + echo "[$device_name] Formatting Go files in $target_dir..." + (cd "$target_dir" && GO111MODULE=off ${GO:-go} fmt .) + echo "[$device_name] Go formatting completed" +} + +# Generate devices for a specific device configuration +generate_devices() { + local config_func="$1" + local mode="$2" + + # Call the configuration function to set variables + $config_func + + # Validate configuration + if [[ -z "$repo" || -z "$lib_path" || -z "$git_hash" || -z "$generator" || -z "$target" || ${#tasks[@]} -eq 0 ]]; then + echo "Error: Missing configuration for device '$name'" + return 1 + fi + + # Use target directory from configuration + local target_dir="$target" + case "$mode" in + generate) + echo "[$name] Running in generation mode - will clean and generate to $target_dir" + ;; + verify) + echo "[$name] Running in verification mode - will verify generated content matches $target_dir" + ;; + *) + echo "[$name] Running in default mode - will generate to $target_dir" + ;; + esac + + # Clone and setup repository + echo "[$name] Setting up repository..." + rm -rf "$lib_path" + git clone "$repo" "$lib_path" + cd "$lib_path" + git checkout "$git_hash" + cd ../../ + + # Create target directory + mkdir -p "$target_dir" + + # Handle verification mode + if [ "$mode" = "verify" ]; then + echo "[$name] Starting verification process..." + + # Check if target directory exists and has content + if [ ! -d "$target_dir" ] || [ -z "$(ls -A "$target_dir" 2>/dev/null)" ]; then + echo "[$name] Verification failed: target directory is empty or does not exist" + return 1 + fi + + # Create temporary directory with same structure + temp_target=".verify/$target" + echo "[$name] Creating temporary directory: $temp_target" + mkdir -p "$temp_target" + + # Generate files to temporary directory + echo "[$name] Generating files to temporary directory..." + generate_device_files "$name" "${tasks[@]}" "$generator" "$temp_target" + + # Copy ignore list files to temporary directory + if [ -n "$ignore_list" ]; then + echo "[$name] Copying ignore list files to temporary directory: $ignore_list" + for file in $ignore_list; do + if [ -f "$target_dir/$file" ]; then + cp "$target_dir/$file" "$temp_target/" + echo "[$name] Copied: $file" + fi + done + fi + + # Compare directories + echo "[$name] Comparing original directory with generated directory..." + if diff -u -r "$target_dir" "$temp_target" > /dev/null 2>&1; then + echo "[$name] Verification passed: generated files match existing files" + VERIFY_RESULT=0 + else + echo "[$name] Verification failed: differences found" + echo "[$name] Detailed differences:" + diff -u -r "$target_dir" "$temp_target" || true + VERIFY_RESULT=1 + fi + + return $VERIFY_RESULT + fi + + # Clean target directory if in generation mode + if [ "$mode" = "generate" ]; then + echo "[$name] Cleaning $target_dir" + + # Backup ignored files if ignore_list is not empty + if [ -n "$ignore_list" ]; then + echo "[$name] Preserving ignore list: $ignore_list" + # Create temp directory to store ignored files + TEMP_DIR=$(mktemp -d) + + # Backup ignored files if they exist + for file in $ignore_list; do + if [ -f "$target_dir/$file" ]; then + cp "$target_dir/$file" "$TEMP_DIR/" + echo "[$name] Backed up: $file" + fi + done + fi + + # Remove all files from target directory + rm -rf "$target_dir"/* + + # Restore ignored files if ignore_list is not empty + if [ -n "$ignore_list" ]; then + for file in $ignore_list; do + if [ -f "$TEMP_DIR/$file" ]; then + cp "$TEMP_DIR/$file" "$target_dir/" + echo "[$name] Restored: $file" + fi + done + + # Clean up temp directory + rm -rf "$TEMP_DIR" + fi + fi + + # Generate device files from all tasks + generate_device_files "$name" "${tasks[@]}" "$generator" "$target_dir" +} + +# Parse command line arguments +MODE="" +case "$1" in + generate) + MODE="generate" + ;; + verify) + MODE="verify" + ;; + *) + MODE="default" + ;; +esac + +# Initialize verification tracking +VERIFICATION_FAILED=0 + +# Process all enabled devices +for config_func in "${DEVICE_CONFIGS[@]}"; do + if ! generate_devices "$config_func" "$MODE"; then + if [ "$MODE" = "verify" ]; then + VERIFICATION_FAILED=1 + fi + fi +done + +if [ "$MODE" = "verify" ]; then + if [ $VERIFICATION_FAILED -eq 0 ]; then + echo "All device verifications passed" + else + echo "Device verification failed: inconsistencies found" + exit 1 + fi +else + echo "All device generations completed!" +fi \ No newline at end of file diff --git a/.github/scripts/validate_embed_packages.sh b/.github/scripts/validate_embed_packages.sh new file mode 100755 index 0000000..efdade7 --- /dev/null +++ b/.github/scripts/validate_embed_packages.sh @@ -0,0 +1,296 @@ +#!/bin/bash + +set -e + + +# Usage function +usage() { + echo "Usage: $0 [device|machine]" + echo "" + echo "Arguments:" + echo " device Validate device packages" + echo " machine Validate machine packages" +} + +# Device validation targets +DEVICE_VALIDATION_TARGETS=( + # arm + "device/arm:cortex-m-qemu" + + # arm64 + "device/arm64:esp32" + + # avr + # NOTE: arduino target current cannot directly import device/avr due to duplicate symbol errors + # "device/avr:arduino-leonardo,atmega1284p,atmega328pb,attiny1616,simavr" + + # esp + "device/esp:esp32,esp8266" + + # gba + "device/gba:gameboy-advance" + + # kendryte + # riscv64 current not support at llgo + # "device/kendryte" + + # nrf + "device/nrf:nrf52840,nrf51" + + # nxp + "device/nxp:teensy40,teensy36" + + # renesas + # "device/renesas" + + # riscv picolibc fail + # "device/riscv:riscv-qemu" + + # rp + "device/rp:rp2350" + + # sam + "device/sam:arduino-zero,atsamd51j19a" + + # sifive + # riscv32 current not support at llgo + # "device/sifive" + + # stm32 - STM32 series microcontrollers + "device/stm32:stm32f4disco,nucleo-f103rb" + + # riscv32 current not support at llgo + # "device/tkey" +) + +# Machine validation targets +MACHINE_VALIDATION_TARGETS=( +) + +# Global variables +VALIDATION_TYPE="" +TOTAL_TESTS=0 +PASSED_TESTS=0 +FAILED_TESTS=0 +PASSED_LIST=() +FAILED_LIST=() + +# Logging functions +log_info() { + echo "[INFO] $1" +} + +log_success() { + echo "[SUCCESS] $1" +} + +log_error() { + echo "[ERROR] $1" +} + +# Create test file for device package validation +create_device_test_file() { + local device_package="$1" + local target="$2" + local filename="test_${target//[-.]/_}.go" + + cat > "$filename" << EOF +package main +import _ "github.com/goplus/emb/$device_package" +//export handleHardFault +func handleHardFault() {} +//export handleInterrupt +func handleInterrupt() {} +//export Reset_Handler +func Reset_Handler() {} +func main() {} +EOF + + echo "$filename" +} + +# Parse command line arguments +parse_arguments() { + if [ $# -eq 0 ]; then + log_error "No arguments provided" + usage + exit 1 + fi + + VALIDATION_TYPE="$1" + + # Validate the validation type + if [[ "$VALIDATION_TYPE" != "device" && "$VALIDATION_TYPE" != "machine" ]]; then + log_error "Invalid validation type: $VALIDATION_TYPE" + log_error "Must be either 'device' or 'machine'" + usage + exit 1 + fi +} + +# Create test file for machine validation +create_machine_test_file() { + local test_dir="_demo/emptycheck" + local test_file="$test_dir/main.go" + + mkdir -p "$test_dir" + cat > "$test_file" << 'EOF' +package main +import ( + _ "github.com/goplus/emb/machine" +) +//export handleHardFault +func handleHardFault() {} +//export handleInterrupt +func handleInterrupt() {} +//export Reset_Handler +func Reset_Handler() {} +func main(){ +} +EOF + log_info "Created test file: $test_file" >&2 + echo "$test_file" +} + +# Device package validation function +validate_device_package() { + local package_spec="$1" + local package_path="${package_spec%:*}" + local targets="${package_spec#*:}" + + log_info "Validating device package: $package_path" + + # Parse targets + IFS=',' read -ra target_array <<< "$targets" + + for target in "${target_array[@]}"; do + local test_number=$((PASSED_TESTS + FAILED_TESTS + 1)) + + echo -n "[$test_number] Testing $package_path with target $target... " + + # Create test file + local test_file + test_file=$(create_device_test_file "$package_path" "$target") + + # Run llgo build test + if llgo build -v -tags nogc -target "$target" "$test_file" 2>&1; then + echo "PASS" + rm -f "$test_file" + ((PASSED_TESTS++)) + PASSED_LIST+=("$package_path -> $target") + else + echo "FAIL" + rm -f "$test_file" + ((FAILED_TESTS++)) + FAILED_LIST+=("$package_path -> $target") + return 1 + fi + done + + return 0 +} + +# Machine package validation function +validate_machine_target() { + local target="$1" + local test_file="$2" + local test_number=$((PASSED_TESTS + FAILED_TESTS + 1)) + + echo -n "[$test_number] Testing $target... " + + # Run llgo build test + if llgo build -v -tags nogc -target="$target" "$test_file" 2>&1; then + echo "PASS" + ((PASSED_TESTS++)) + PASSED_LIST+=("$target") + return 0 + else + echo "FAIL" + ((FAILED_TESTS++)) + FAILED_LIST+=("$target") + return 1 + fi +} + +# Main validation function +run_validation() { + log_info "Starting $VALIDATION_TYPE package validation" + + if [ "$VALIDATION_TYPE" = "device" ]; then + log_info "Total device packages to validate: ${#DEVICE_VALIDATION_TARGETS[@]}" + + for package_spec in "${DEVICE_VALIDATION_TARGETS[@]}"; do + validate_device_package "$package_spec" || true + done + + elif [ "$VALIDATION_TYPE" = "machine" ]; then + TOTAL_TESTS=${#MACHINE_VALIDATION_TARGETS[@]} + log_info "Total machine targets to validate: $TOTAL_TESTS" + + # Create test file for machine validation + local test_file=$(create_machine_test_file) + + for target in "${MACHINE_VALIDATION_TARGETS[@]}"; do + validate_machine_target "$target" "$test_file" || true + done + fi +} + +# Print final results +print_results() { + local total_tests=$((PASSED_TESTS + FAILED_TESTS)) + + echo "" + echo "======================================" + echo " VALIDATION SUMMARY" + echo "======================================" + echo "Validation Type: $VALIDATION_TYPE" + echo "Total Tests: $total_tests" + echo "Passed: $PASSED_TESTS" + echo "Failed: $FAILED_TESTS" + echo "======================================" + + if [ ${#PASSED_LIST[@]} -gt 0 ]; then + echo "" + echo "PASSED TARGETS:" + for target in "${PASSED_LIST[@]}"; do + echo " ✓ $target" + done + fi + + if [ ${#FAILED_LIST[@]} -gt 0 ]; then + echo "" + echo "FAILED TARGETS:" + for target in "${FAILED_LIST[@]}"; do + echo " ✗ $target" + done + fi + + echo "======================================" +} + + +# Main execution +main() { + parse_arguments "$@" + + # Clean up any existing test files + rm -f test_*.go + + run_validation + print_results + + # Clean up test files + rm -f test_*.go + + if [ $FAILED_TESTS -eq 0 ]; then + log_success "All validations passed!" + exit 0 + else + log_error "Some validations failed!" + exit 1 + fi +} + +# Run main function with all arguments +main "$@" diff --git a/.github/workflows/scripts/sync-module.sh b/.github/workflows/scripts/sync_module.sh old mode 100755 new mode 100644 similarity index 97% rename from .github/workflows/scripts/sync-module.sh rename to .github/workflows/scripts/sync_module.sh index 465faa5..fec14e1 --- a/.github/workflows/scripts/sync-module.sh +++ b/.github/workflows/scripts/sync_module.sh @@ -63,4 +63,4 @@ rsync -av --delete "$FULL_SOURCE_PATH/" "$TARGET_DIR/" echo "=========================================" echo "✅ Sync completed successfully" -echo "=========================================" +echo "=========================================" \ No newline at end of file diff --git a/.github/workflows/validate-embed-packages.yml b/.github/workflows/validate-embed-packages.yml new file mode 100644 index 0000000..e8c376c --- /dev/null +++ b/.github/workflows/validate-embed-packages.yml @@ -0,0 +1,28 @@ +name: Device and Machine Package Validation + +on: + push: + branches: ["**"] + pull_request: + branches: ["**"] +jobs: + validate-device-packages: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.21" + - name: Verify Device Generation + run: | + go install ./_tools/gen-device-avr + go install ./_tools/gen-device-svd + bash ./.github/scripts/device-gen.sh verify + - name: Setup LLGO + uses: ./.github/actions/setup-llgo + with: + commit-hash: b25ae1b4e7c06a302d1d09eb9e9b0ad1e3a43abd + - name: Run Device Package Validation + run: | + ./.github/scripts/validate_embed_packages.sh device diff --git a/_tools/gen-device-avr/gen-device-avr.go b/_tools/gen-device-avr/gen-device-avr.go new file mode 100755 index 0000000..7f5eafa --- /dev/null +++ b/_tools/gen-device-avr/gen-device-avr.go @@ -0,0 +1,727 @@ +// From tinygo v0.39.0 +package main + +import ( + "bufio" + "encoding/xml" + "fmt" + "html/template" + "math/bits" + "os" + "path/filepath" + "runtime" + "sort" + "strconv" + "strings" + "sync" +) + +type AVRToolsDeviceFile struct { + XMLName xml.Name `xml:"avr-tools-device-file"` + Devices []struct { + Name string `xml:"name,attr"` + Architecture string `xml:"architecture,attr"` + Family string `xml:"family,attr"` + AddressSpaces []struct { + Name string `xml:"name,attr"` + Size string `xml:"size,attr"` + MemorySegments []struct { + Name string `xml:"name,attr"` + Start string `xml:"start,attr"` + Size string `xml:"size,attr"` + } `xml:"memory-segment"` + } `xml:"address-spaces>address-space"` + PeripheralInstances []struct { + Name string `xml:"name,attr"` + Caption string `xml:"caption,attr"` + RegisterGroup struct { + NameInModule string `xml:"name-in-module,attr"` + Offset string `xml:"offset,attr"` + } `xml:"register-group"` + } `xml:"peripherals>module>instance"` + Interrupts []*XMLInterrupt `xml:"interrupts>interrupt"` + } `xml:"devices>device"` + PeripheralRegisterGroups []struct { + Name string `xml:"name,attr"` + Caption string `xml:"caption,attr"` + Registers []struct { + Name string `xml:"name,attr"` + Caption string `xml:"caption,attr"` + Offset string `xml:"offset,attr"` + Size uint64 `xml:"size,attr"` + Bitfields []struct { + Name string `xml:"name,attr"` + Caption string `xml:"caption,attr"` + Mask string `xml:"mask,attr"` + } `xml:"bitfield"` + } `xml:"register"` + } `xml:"modules>module>register-group"` +} + +type XMLInterrupt struct { + Index int `xml:"index,attr"` + Name string `xml:"name,attr"` + Instance string `xml:"module-instance,attr"` + Caption string `xml:"caption,attr"` +} + +type Device struct { + metadata map[string]interface{} + interrupts []Interrupt + types []*PeripheralType + instances []*PeripheralInstance + oldStyle bool +} + +// AddressSpace is the Go version of an XML element like the following: +// +// +// +// It describes one address space in an AVR microcontroller. One address space +// may have multiple memory segments. +type AddressSpace struct { + Size string + Segments map[string]MemorySegment +} + +// MemorySegment is the Go version of an XML element like the following: +// +// +// +// It describes a single contiguous area of memory in a particular address space +// (see AddressSpace). +type MemorySegment struct { + start int64 + size int64 +} + +type Interrupt struct { + Index int + Name string + Caption string +} + +// Peripheral instance, for example PORTB +type PeripheralInstance struct { + Name string + Caption string + Address uint64 + Type *PeripheralType +} + +// Peripheral type, for example PORT (if it's shared between different +// instances, which is the case for new-style ATDF files). +type PeripheralType struct { + Name string + Caption string + Registers []*Register + Instances []*PeripheralInstance +} + +// Single register or struct field in a peripheral type. +type Register struct { + Caption string + Name string + Type string + Offset uint64 // offset, only for old-style ATDF files + Bitfields []Bitfield +} + +type Bitfield struct { + Name string + Caption string + Mask uint +} + +func readATDF(path string) (*Device, error) { + // Read Atmel device descriptor files. + // See: http://packs.download.atmel.com + + // Open the XML file. + f, err := os.Open(path) + if err != nil { + return nil, err + } + defer f.Close() + decoder := xml.NewDecoder(f) + xml := &AVRToolsDeviceFile{} + err = decoder.Decode(xml) + if err != nil { + return nil, err + } + + device := xml.Devices[0] + + memorySizes := make(map[string]*AddressSpace, len(device.AddressSpaces)) + for _, el := range device.AddressSpaces { + memorySizes[el.Name] = &AddressSpace{ + Size: el.Size, + Segments: make(map[string]MemorySegment), + } + for _, segmentEl := range el.MemorySegments { + start, err := strconv.ParseInt(segmentEl.Start, 0, 32) + if err != nil { + return nil, err + } + size, err := strconv.ParseInt(segmentEl.Size, 0, 32) + if err != nil { + return nil, err + } + memorySizes[el.Name].Segments[segmentEl.Name] = MemorySegment{ + start: start, + size: size, + } + } + } + + // There appear to be two kinds of devices and ATDF files: those before + // ~2017 and those introduced as part of the tinyAVR (1 and 2 series). + // The newer devices are structured slightly differently, with peripherals + // laid out more like Cortex-M chips and one or more instances per chip. + // Older designs basically just have a bunch of registers with little + // structure in them. + // The code generated for these chips is quite different: + // * For old-style chips we'll generate a bunch of registers without + // peripherals (e.g. PORTB, DDRB, etc). + // * For new-style chips we'll generate proper peripheral structs like we + // do for Cortex-M chips. + oldStyle := true + for _, instanceEl := range device.PeripheralInstances { + if instanceEl.RegisterGroup.NameInModule == "" { + continue + } + offset, err := strconv.ParseUint(instanceEl.RegisterGroup.Offset, 0, 16) + if err != nil { + return nil, fmt.Errorf("failed to parse offset %#v of peripheral %s: %v", instanceEl.RegisterGroup.Offset, instanceEl.Name, err) + } + if offset != 0 { + oldStyle = false + } + } + + // Read all peripheral types. + var types []*PeripheralType + typeMap := make(map[string]*PeripheralType) + allRegisters := map[string]*Register{} + for _, registerGroupEl := range xml.PeripheralRegisterGroups { + var regs []*Register + regEls := registerGroupEl.Registers + if !oldStyle { + // We only need to sort registers when we're generating peripheral + // structs. + sort.SliceStable(regEls, func(i, j int) bool { + return regEls[i].Offset < regEls[j].Offset + }) + } + addReg := func(reg *Register) { + if oldStyle { + // Check for duplicate registers (they happen). + if reg2 := allRegisters[reg.Name]; reg2 != nil { + return + } + allRegisters[reg.Name] = reg + } + regs = append(regs, reg) + } + offset := uint64(0) + for _, regEl := range regEls { + regOffset, err := strconv.ParseUint(regEl.Offset, 0, 64) + if err != nil { + return nil, fmt.Errorf("failed to parse offset %#v of register %s: %v", regEl.Offset, regEl.Name, err) + } + if !oldStyle { + // Add some padding to the gap in the struct, if needed. + if offset < regOffset { + regs = append(regs, &Register{ + Name: "_", + Type: fmt.Sprintf("[%d]volatile.Register8", regOffset-offset), + }) + offset = regOffset + } + + // Check for overlapping registers. + if offset > regOffset { + return nil, fmt.Errorf("register %s in peripheral %s overlaps with another register", regEl.Name, registerGroupEl.Name) + } + } + + var bitfields []Bitfield + for _, bitfieldEl := range regEl.Bitfields { + maskString := bitfieldEl.Mask + if len(maskString) == 2 { + // Two devices (ATtiny102 and ATtiny104) appear to have an + // error in the bitfields, leaving out the '0x' prefix. + maskString = "0x" + maskString + } + mask, err := strconv.ParseUint(maskString, 0, 32) + if err != nil { + return nil, fmt.Errorf("failed to parse mask %#v of bitfield %s: %v", maskString, bitfieldEl.Name, err) + } + name := regEl.Name + "_" + bitfieldEl.Name + if !oldStyle { + name = registerGroupEl.Name + "_" + name + } + bitfields = append(bitfields, Bitfield{ + Name: name, + Caption: bitfieldEl.Caption, + Mask: uint(mask), + }) + } + + switch regEl.Size { + case 1: + addReg(&Register{ + Name: regEl.Name, + Type: "volatile.Register8", + Caption: regEl.Caption, + Offset: regOffset, + Bitfields: bitfields, + }) + case 2: + addReg(&Register{ + Name: regEl.Name + "L", + Type: "volatile.Register8", + Caption: regEl.Caption + " (lower bits)", + Offset: regOffset + 0, + }) + addReg(&Register{ + Name: regEl.Name + "H", + Type: "volatile.Register8", + Caption: regEl.Caption + " (upper bits)", + Offset: regOffset + 1, + }) + default: + panic("todo: unknown size") + } + offset += regEl.Size + } + periphType := &PeripheralType{ + Name: registerGroupEl.Name, + Caption: registerGroupEl.Caption, + Registers: regs, + } + types = append(types, periphType) + typeMap[periphType.Name] = periphType + } + + // Read all peripheral instances. + var instances []*PeripheralInstance + for _, instanceEl := range device.PeripheralInstances { + if instanceEl.RegisterGroup.NameInModule == "" { + continue + } + offset, err := strconv.ParseUint(instanceEl.RegisterGroup.Offset, 0, 16) + if err != nil { + return nil, fmt.Errorf("failed to parse offset %#v of peripheral %s: %v", instanceEl.RegisterGroup.Offset, instanceEl.Name, err) + } + periphType := typeMap[instanceEl.RegisterGroup.NameInModule] + instance := &PeripheralInstance{ + Name: instanceEl.Name, + Caption: instanceEl.Caption, + Address: offset, + Type: periphType, + } + instances = append(instances, instance) + periphType.Instances = append(periphType.Instances, instance) + } + + ramStart := int64(0) + ramSize := int64(0) // for devices with no RAM + for _, ramSegmentName := range []string{"IRAM", "INTERNAL_SRAM", "SRAM"} { + if segment, ok := memorySizes["data"].Segments[ramSegmentName]; ok { + ramStart = segment.start + ramSize = segment.size + } + } + + // Flash that is mapped into the data address space (attiny10, attiny1616, + // etc). + mappedFlashStart := int64(0) + for _, name := range []string{"MAPPED_PROGMEM", "MAPPED_FLASH"} { + if segment, ok := memorySizes["data"].Segments[name]; ok { + mappedFlashStart = segment.start + } + } + + flashSize, err := strconv.ParseInt(memorySizes["prog"].Size, 0, 32) + if err != nil { + return nil, err + } + + // Process the interrupts to clean up inconsistencies between ATDF files. + var interrupts []Interrupt + hasResetInterrupt := false + for _, intr := range device.Interrupts { + name := intr.Name + if intr.Instance != "" { + // ATDF files for newer chips also have an instance name, which must + // be specified to make the interrupt name unique. + name = intr.Instance + "_" + name + } + if name == "RESET" { + hasResetInterrupt = true + } + interrupts = append(interrupts, Interrupt{ + Index: intr.Index, + Name: name, + Caption: intr.Caption, + }) + } + if !hasResetInterrupt { + interrupts = append(interrupts, Interrupt{ + Index: 0, + Name: "RESET", + }) + } + sort.SliceStable(interrupts, func(i, j int) bool { + return interrupts[i].Index < interrupts[j].Index + }) + + return &Device{ + metadata: map[string]interface{}{ + "file": filepath.Base(path), + "descriptorSource": "http://packs.download.atmel.com/", + "name": device.Name, + "nameLower": strings.ToLower(device.Name), + "description": fmt.Sprintf("Device information for the %s.", device.Name), + "arch": device.Architecture, + "family": device.Family, + "flashSize": int(flashSize), + "ramStart": ramStart, + "ramSize": ramSize, + "mappedFlashStart": mappedFlashStart, + "numInterrupts": len(device.Interrupts), + }, + interrupts: interrupts, + types: types, + instances: instances, + oldStyle: oldStyle, + }, nil +} + +func writeGo(outdir string, device *Device) error { + // The Go module for this device. + outf, err := os.Create(outdir + "/" + device.metadata["nameLower"].(string) + ".go") + if err != nil { + return err + } + defer outf.Close() + w := bufio.NewWriter(outf) + + maxInterruptNum := 0 + for _, intr := range device.interrupts { + if intr.Index > maxInterruptNum { + maxInterruptNum = intr.Index + } + } + + t := template.Must(template.New("go").Parse(`// Automatically generated file. DO NOT EDIT. +// Generated by gen-device-avr.go from {{.metadata.file}}, see {{.metadata.descriptorSource}} + +//go:build {{.pkgName}} && {{.metadata.nameLower}} + +// {{.metadata.description}} +package {{.pkgName}} + +import ( + "github.com/goplus/emb/runtime/volatile" + "unsafe" +) + +// Some information about this device. +const ( + DEVICE = "{{.metadata.name}}" + ARCH = "{{.metadata.arch}}" + FAMILY = "{{.metadata.family}}" +) + +// Interrupts +const ({{range .interrupts}} + IRQ_{{.Name}} = {{.Index}} // {{.Caption}}{{end}} + IRQ_max = {{.interruptMax}} // Highest interrupt number on this device. +) + +// Pseudo function call that is replaced by the compiler with the actual +// functions registered through interrupt.New. +// +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int){ + // TODO: implement interrupt handler dispatch mechanism +} + +{{- range .interrupts}} +//export __vector_{{.Name}} +//go:interrupt +func interrupt{{.Name}}() { + callHandlers(IRQ_{{.Name}}) +} +{{- end}} + +{{if .oldStyle -}} +// Peripherals. +var ( +{{- range .instances}} + // {{.Caption}} + {{range .Type.Registers -}} + {{if ne .Name "_" -}} + {{.Name}} = (*{{.Type}})(unsafe.Pointer(uintptr(0x{{printf "%x" .Offset}}))) + {{end -}} + {{end -}} +{{end}}) +{{else}} +// Peripherals instances. +var ( +{{- range .instances -}} + {{.Name}} = (*{{.Type.Name}}_Type)(unsafe.Pointer(uintptr(0x{{printf "%x" .Address}}))) + {{- if .Caption}}// {{.Caption}}{{end}} +{{end -}} +) + +// Peripheral type definitions. + +{{range .types}} +type {{.Name}}_Type struct { +{{range .Registers -}} + {{.Name}} {{.Type}} {{if .Caption}} // {{.Caption}} {{end}} +{{end -}} +} +{{end}} +{{end}} +`)) + err = t.Execute(w, map[string]interface{}{ + "metadata": device.metadata, + "pkgName": filepath.Base(strings.TrimRight(outdir, "/")), + "interrupts": device.interrupts, + "interruptMax": maxInterruptNum, + "instances": device.instances, + "types": device.types, + "oldStyle": device.oldStyle, + }) + if err != nil { + return err + } + + // Write bitfields. + for _, peripheral := range device.types { + // Only write bitfields when there are any. + numFields := 0 + for _, r := range peripheral.Registers { + numFields += len(r.Bitfields) + } + if numFields == 0 { + continue + } + + fmt.Fprintf(w, "\n// Bitfields for %s: %s\nconst(", peripheral.Name, peripheral.Caption) + for _, register := range peripheral.Registers { + if len(register.Bitfields) == 0 { + continue + } + fmt.Fprintf(w, "\n\t// %s", register.Name) + if register.Caption != "" { + fmt.Fprintf(w, ": %s", register.Caption) + } + fmt.Fprintf(w, "\n") + allBits := map[string]interface{}{} + for _, bitfield := range register.Bitfields { + if bits.OnesCount(bitfield.Mask) == 1 { + fmt.Fprintf(w, "\t%s = 0x%x", bitfield.Name, bitfield.Mask) + if len(bitfield.Caption) != 0 { + fmt.Fprintf(w, " // %s", bitfield.Caption) + } + fmt.Fprintf(w, "\n") + fmt.Fprintf(w, "\t%s_Msk = 0x%x", bitfield.Name, bitfield.Mask) + if len(bitfield.Caption) != 0 { + fmt.Fprintf(w, " // %s", bitfield.Caption) + } + fmt.Fprintf(w, "\n") + allBits[bitfield.Name] = nil + } else { + n := 0 + for i := uint(0); i < 8; i++ { + if (bitfield.Mask>>i)&1 == 0 { + continue + } + name := fmt.Sprintf("%s%d", bitfield.Name, n) + if _, ok := allBits[name]; !ok { + fmt.Fprintf(w, "\t%s = 0x%x", name, 1< num { + fmt.Fprintf(out, " %s __vector_default\n", jmp) + num++ + } + num++ + fmt.Fprintf(out, " %s __vector_%s\n", jmp, intr.Name) + } + + fmt.Fprint(out, ` + ; Define default implementations for interrupts, redirecting to + ; __vector_default when not implemented. +`) + for _, intr := range device.interrupts { + fmt.Fprintf(out, " IRQ __vector_%s\n", intr.Name) + } + return nil +} + +func writeLD(outdir string, device *Device) error { + // Variables for the linker script. + out, err := os.Create(outdir + "/" + device.metadata["nameLower"].(string) + ".ld") + if err != nil { + return err + } + defer out.Close() + t := template.Must(template.New("ld").Parse(`/* Automatically generated file. DO NOT EDIT. */ +/* Generated by gen-device-avr.go from {{.file}}, see {{.descriptorSource}} */ + +__flash_size = 0x{{printf "%x" .flashSize}}; +{{if .mappedFlashStart -}} +__mapped_flash_start = 0x{{printf "%x" .mappedFlashStart}}; +{{end -}} +__ram_start = 0x{{printf "%x" .ramStart}}; +__ram_size = 0x{{printf "%x" .ramSize}}; +__num_isrs = {{.numInterrupts}}; +`)) + return t.Execute(out, device.metadata) +} + +func processFile(filepath, outdir string) error { + device, err := readATDF(filepath) + if err != nil { + return err + } + // current define in llgo + // err = writeAsm(outdir, device) + // if err != nil { + // return err + // } + // current define in llgo + // return writeLD(outdir, device) + return writeGo(outdir, device) +} + +func generate(indir, outdir string) error { + // Read list of ATDF files to process. + matches, err := filepath.Glob(indir + "/*.atdf") + if err != nil { + return err + } + + // Start worker goroutines. + var wg sync.WaitGroup + workChan := make(chan string) + errChan := make(chan error, 1) + for i := 0; i < runtime.NumCPU(); i++ { + go func() { + for filepath := range workChan { + err := processFile(filepath, outdir) + wg.Done() + if err != nil { + // Store error to errChan if no error was stored before. + select { + case errChan <- err: + default: + } + } + } + }() + } + + // Submit all jobs to the goroutines. + wg.Add(len(matches)) + for _, filepath := range matches { + fmt.Println(filepath) + workChan <- filepath + } + close(workChan) + + // Wait until all workers have finished. + wg.Wait() + + // Check for an error. + select { + case err := <-errChan: + return err + default: + return nil + } +} + +func main() { + indir := os.Args[1] // directory with register descriptor files (*.atdf) + outdir := os.Args[2] // output directory + err := generate(indir, outdir) + if err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} diff --git a/_tools/gen-device-svd/gen-device-svd.go b/_tools/gen-device-svd/gen-device-svd.go new file mode 100755 index 0000000..8e44dcf --- /dev/null +++ b/_tools/gen-device-svd/gen-device-svd.go @@ -0,0 +1,1513 @@ +package main + +import ( + "bufio" + "encoding/xml" + "errors" + "flag" + "fmt" + "io/fs" + "os" + "path/filepath" + "regexp" + "sort" + "strconv" + "strings" + "text/template" + "unicode" +) + +var validName = regexp.MustCompile("^[a-zA-Z0-9_]+$") +var enumBitSpecifier = regexp.MustCompile("^#x*[01]+[01x]*$") + +type SVDFile struct { + XMLName xml.Name `xml:"device"` + Name string `xml:"name"` + Description string `xml:"description"` + LicenseText string `xml:"licenseText"` + CPU *struct { + Name string `xml:"name"` + FPUPresent bool `xml:"fpuPresent"` + NVICPrioBits int `xml:"nvicPrioBits"` + } `xml:"cpu"` + Peripherals []SVDPeripheral `xml:"peripherals>peripheral"` +} + +type SVDPeripheral struct { + Name string `xml:"name"` + Description string `xml:"description"` + BaseAddress string `xml:"baseAddress"` + GroupName string `xml:"groupName"` + DerivedFrom string `xml:"derivedFrom,attr"` + Interrupts []struct { + Name string `xml:"name"` + Index int `xml:"value"` + } `xml:"interrupt"` + Registers []*SVDRegister `xml:"registers>register"` + Clusters []*SVDCluster `xml:"registers>cluster"` +} + +type SVDRegister struct { + Name string `xml:"name"` + Description string `xml:"description"` + Dim *string `xml:"dim"` + DimIndex *string `xml:"dimIndex"` + DimIncrement string `xml:"dimIncrement"` + Size *string `xml:"size"` + Fields []*SVDField `xml:"fields>field"` + Offset *string `xml:"offset"` + AddressOffset *string `xml:"addressOffset"` +} + +type SVDField struct { + Name string `xml:"name"` + Description string `xml:"description"` + Lsb *uint32 `xml:"lsb"` + Msb *uint32 `xml:"msb"` + BitOffset *uint32 `xml:"bitOffset"` + BitWidth *uint32 `xml:"bitWidth"` + BitRange *string `xml:"bitRange"` + EnumeratedValues struct { + DerivedFrom string `xml:"derivedFrom,attr"` + Name string `xml:"name"` + EnumeratedValue []struct { + Name string `xml:"name"` + Description string `xml:"description"` + Value string `xml:"value"` + } `xml:"enumeratedValue"` + } `xml:"enumeratedValues"` +} + +type SVDCluster struct { + Dim *int `xml:"dim"` + DimIncrement string `xml:"dimIncrement"` + DimIndex *string `xml:"dimIndex"` + Name string `xml:"name"` + Description string `xml:"description"` + Registers []*SVDRegister `xml:"register"` + Clusters []*SVDCluster `xml:"cluster"` + AddressOffset string `xml:"addressOffset"` +} + +type Device struct { + Metadata *Metadata + Interrupts []*Interrupt + Peripherals []*Peripheral + PeripheralDict map[string]*Peripheral +} + +type Metadata struct { + File string + DescriptorSource string + Name string + NameLower string + Description string + LicenseBlock string + + HasCPUInfo bool // set if the following fields are populated + CPUName string + FPUPresent bool + NVICPrioBits int +} + +type Interrupt struct { + Name string + HandlerName string + PeripheralIndex int + Value int // interrupt number + Description string +} + +type Peripheral struct { + Name string + GroupName string + BaseAddress uint64 + Description string + ClusterName string + Registers []*PeripheralField + Subtypes []*Peripheral +} + +// A PeripheralField is a single field in a peripheral type. It may be a full +// peripheral or a cluster within a peripheral. +type PeripheralField struct { + Name string + Address uint64 + Description string + Registers []*PeripheralField // contains fields if this is a cluster + Array int + ElementSize int + Constants []Constant + ShortName string // name stripped of "spaced array" suffix + Bitfields []Bitfield // set of bit-fields provided by this + HasBitfields bool // set true when Bitfields was set for a first PeripheralField of "spaced array". +} + +type Constant struct { + Name string + Description string + Value uint64 +} + +type Bitfield struct { + Name string + Offset uint32 + Mask uint32 +} + +func formatText(text string) string { + text = regexp.MustCompile(`[ \t\n]+`).ReplaceAllString(text, " ") // Collapse whitespace (like in HTML) + text = strings.ReplaceAll(text, "\\n ", "\n") + text = strings.TrimSpace(text) + return text +} + +func isMultiline(s string) bool { + return strings.Index(s, "\n") >= 0 +} + +func splitLine(s string) []string { + return strings.Split(s, "\n") +} + +// Replace characters that are not allowed in a symbol name with a '_'. This is +// useful to be able to process SVD files with errors. +func cleanName(text string) string { + if !validName.MatchString(text) { + result := make([]rune, 0, len(text)) + for _, c := range text { + if validName.MatchString(string(c)) { + result = append(result, c) + } else { + result = append(result, '_') + } + } + text = string(result) + } + if len(text) != 0 && (text[0] >= '0' && text[0] <= '9') { + // Identifiers may not start with a number. + // Add an underscore instead. + text = "_" + text + } + return text +} + +func processSubCluster(p *Peripheral, cluster *SVDCluster, clusterOffset uint64, clusterName string, peripheralDict map[string]*Peripheral) []*Peripheral { + var peripheralsList []*Peripheral + clusterPrefix := clusterName + "_" + cpRegisters := []*PeripheralField{} + + for _, regEl := range cluster.Registers { + cpRegisters = append(cpRegisters, parseRegister(p.GroupName, regEl, p.BaseAddress+clusterOffset, clusterPrefix)...) + } + // handle sub-clusters of registers + for _, subClusterEl := range cluster.Clusters { + subclusterName := strings.ReplaceAll(subClusterEl.Name, "[%s]", "") + subclusterPrefix := subclusterName + "_" + subclusterOffset, err := strconv.ParseUint(subClusterEl.AddressOffset, 0, 32) + if err != nil { + panic(err) + } + subdim := *subClusterEl.Dim + subdimIncrement, err := strconv.ParseInt(subClusterEl.DimIncrement, 0, 32) + if err != nil { + panic(err) + } + + if subdim > 1 { + subcpRegisters := []*PeripheralField{} + for _, regEl := range subClusterEl.Registers { + subcpRegisters = append(subcpRegisters, parseRegister(p.GroupName, regEl, p.BaseAddress+clusterOffset+subclusterOffset, subclusterPrefix)...) + } + + cpRegisters = append(cpRegisters, &PeripheralField{ + Name: subclusterName, + Address: p.BaseAddress + clusterOffset + subclusterOffset, + Description: subClusterEl.Description, + Registers: subcpRegisters, + Array: subdim, + ElementSize: int(subdimIncrement), + ShortName: clusterPrefix + subclusterName, + }) + } else { + for _, regEl := range subClusterEl.Registers { + cpRegisters = append(cpRegisters, parseRegister(regEl.Name, regEl, p.BaseAddress+clusterOffset+subclusterOffset, subclusterPrefix)...) + } + } + } + + sort.SliceStable(cpRegisters, func(i, j int) bool { + return cpRegisters[i].Address < cpRegisters[j].Address + }) + clusterPeripheral := &Peripheral{ + Name: p.Name + "_" + clusterName, + GroupName: p.GroupName + "_" + clusterName, + Description: p.Description + " - " + clusterName, + ClusterName: clusterName, + BaseAddress: p.BaseAddress + clusterOffset, + Registers: cpRegisters, + } + peripheralsList = append(peripheralsList, clusterPeripheral) + peripheralDict[clusterPeripheral.Name] = clusterPeripheral + p.Subtypes = append(p.Subtypes, clusterPeripheral) + + return peripheralsList +} + +func processCluster(p *Peripheral, clusters []*SVDCluster, peripheralDict map[string]*Peripheral) []*Peripheral { + var peripheralsList []*Peripheral + for _, cluster := range clusters { + clusterName := strings.ReplaceAll(cluster.Name, "[%s]", "") + if cluster.DimIndex != nil { + clusterName = strings.ReplaceAll(clusterName, "%s", "") + } + clusterPrefix := clusterName + "_" + clusterOffset, err := strconv.ParseUint(cluster.AddressOffset, 0, 32) + if err != nil { + panic(err) + } + var dim, dimIncrement int + if cluster.Dim == nil { + // Nordic SVD have sub-clusters with another sub-clusters. + if clusterOffset == 0 || len(cluster.Clusters) > 0 { + peripheralsList = append(peripheralsList, processSubCluster(p, cluster, clusterOffset, clusterName, peripheralDict)...) + continue + } + dim = -1 + dimIncrement = -1 + } else { + dim = *cluster.Dim + if dim == 1 { + dimIncrement = -1 + } else { + inc, err := strconv.ParseUint(cluster.DimIncrement, 0, 32) + if err != nil { + panic(err) + } + dimIncrement = int(inc) + } + } + clusterRegisters := []*PeripheralField{} + for _, regEl := range cluster.Registers { + regName := p.GroupName + if regName == "" { + regName = p.Name + } + clusterRegisters = append(clusterRegisters, parseRegister(regName, regEl, p.BaseAddress+clusterOffset, clusterPrefix)...) + } + sort.SliceStable(clusterRegisters, func(i, j int) bool { + return clusterRegisters[i].Address < clusterRegisters[j].Address + }) + if dimIncrement == -1 && len(clusterRegisters) > 0 { + lastReg := clusterRegisters[len(clusterRegisters)-1] + lastAddress := lastReg.Address + if lastReg.Array != -1 { + lastAddress = lastReg.Address + uint64(lastReg.Array*lastReg.ElementSize) + } + firstAddress := clusterRegisters[0].Address + dimIncrement = int(lastAddress - firstAddress) + } + + if !unicode.IsUpper(rune(clusterName[0])) && !unicode.IsDigit(rune(clusterName[0])) { + clusterName = strings.ToUpper(clusterName) + } + + p.Registers = append(p.Registers, &PeripheralField{ + Name: clusterName, + Address: p.BaseAddress + clusterOffset, + Description: cluster.Description, + Registers: clusterRegisters, + Array: dim, + ElementSize: dimIncrement, + ShortName: clusterName, + }) + } + sort.SliceStable(p.Registers, func(i, j int) bool { + return p.Registers[i].Address < p.Registers[j].Address + }) + return peripheralsList +} + +// Read ARM SVD files. +func readSVD(path, sourceURL string) (*Device, error) { + // Open the XML file. + f, err := os.Open(path) + if err != nil { + return nil, err + } + defer f.Close() + decoder := xml.NewDecoder(f) + device := &SVDFile{} + err = decoder.Decode(device) + if err != nil { + return nil, err + } + + peripheralDict := map[string]*Peripheral{} + groups := map[string]*Peripheral{} + + interrupts := make(map[string]*Interrupt) + var peripheralsList []*Peripheral + + // Some SVD files have peripheral elements derived from a peripheral that + // comes later in the file. To make sure this works, sort the peripherals if + // needed. + orderedPeripherals := orderPeripherals(device.Peripherals) + + for _, periphEl := range orderedPeripherals { + description := formatText(periphEl.Description) + baseAddress, err := strconv.ParseUint(periphEl.BaseAddress, 0, 64) + if err != nil { + return nil, fmt.Errorf("invalid base address: %w", err) + } + // Some group names (for example the STM32H7A3x) have an invalid + // group name. Replace invalid characters with "_". + groupName := cleanName(periphEl.GroupName) + if groupName == "" { + groupName = cleanName(periphEl.Name) + } + + for _, interrupt := range periphEl.Interrupts { + addInterrupt(interrupts, interrupt.Name, interrupt.Name, interrupt.Index, description) + // As a convenience, also use the peripheral name as the interrupt + // name. Only do that for the nrf for now, as the stm32 .svd files + // don't always put interrupts in the correct peripheral... + if len(periphEl.Interrupts) == 1 && strings.HasPrefix(device.Name, "nrf") { + addInterrupt(interrupts, periphEl.Name, interrupt.Name, interrupt.Index, description) + } + } + + if _, ok := groups[groupName]; ok || periphEl.DerivedFrom != "" { + var derivedFrom *Peripheral + if periphEl.DerivedFrom != "" { + derivedFrom = peripheralDict[periphEl.DerivedFrom] + } else { + derivedFrom = groups[groupName] + } + p := &Peripheral{ + Name: periphEl.Name, + GroupName: derivedFrom.GroupName, + Description: description, + BaseAddress: baseAddress, + } + if p.Description == "" { + p.Description = derivedFrom.Description + } + peripheralsList = append(peripheralsList, p) + peripheralDict[p.Name] = p + for _, subtype := range derivedFrom.Subtypes { + peripheralsList = append(peripheralsList, &Peripheral{ + Name: periphEl.Name + "_" + subtype.ClusterName, + GroupName: subtype.GroupName, + Description: subtype.Description, + BaseAddress: baseAddress, + }) + } + continue + } + + p := &Peripheral{ + Name: periphEl.Name, + GroupName: groupName, + Description: description, + BaseAddress: baseAddress, + Registers: []*PeripheralField{}, + } + if p.GroupName == "" { + p.GroupName = periphEl.Name + } + peripheralsList = append(peripheralsList, p) + peripheralDict[periphEl.Name] = p + + if _, ok := groups[groupName]; !ok && groupName != "" { + groups[groupName] = p + } + + for _, register := range periphEl.Registers { + regName := groupName // preferably use the group name + if regName == "" { + regName = periphEl.Name // fall back to peripheral name + } + p.Registers = append(p.Registers, parseRegister(regName, register, baseAddress, "")...) + } + peripheralsList = append(peripheralsList, processCluster(p, periphEl.Clusters, peripheralDict)...) + } + + // Make a sorted list of interrupts. + interruptList := make([]*Interrupt, 0, len(interrupts)) + for _, intr := range interrupts { + interruptList = append(interruptList, intr) + } + sort.SliceStable(interruptList, func(i, j int) bool { + if interruptList[i].Value != interruptList[j].Value { + return interruptList[i].Value < interruptList[j].Value + } + return interruptList[i].PeripheralIndex < interruptList[j].PeripheralIndex + }) + + // Properly format the description, with comments. + description := "" + if text := device.Description; text != "" { + description = "// " + strings.ReplaceAll(text, "\n", "\n// ") + description = regexp.MustCompile(`\s+\n`).ReplaceAllString(description, "\n") + } + + // Properly format the license block, with comments. + licenseBlock := "" + if text := formatText(device.LicenseText); text != "" { + licenseBlock = "// " + strings.ReplaceAll(text, "\n", "\n// ") + licenseBlock = regexp.MustCompile(`\s+\n`).ReplaceAllString(licenseBlock, "\n") + } + + // Remove "-" characters from the device name because such characters cannot + // be used in build tags. Necessary for the ESP32-C3 for example. + nameLower := strings.ReplaceAll(strings.ToLower(device.Name), "-", "") + metadata := &Metadata{ + File: filepath.Base(path), + DescriptorSource: sourceURL, + Name: device.Name, + NameLower: nameLower, + Description: description, + LicenseBlock: licenseBlock, + } + if device.CPU != nil { + metadata.HasCPUInfo = true + metadata.CPUName = device.CPU.Name + metadata.FPUPresent = device.CPU.FPUPresent + metadata.NVICPrioBits = device.CPU.NVICPrioBits + } + return &Device{ + Metadata: metadata, + Interrupts: interruptList, + Peripherals: peripheralsList, + PeripheralDict: peripheralDict, + }, nil +} + +// orderPeripherals sorts the peripherals so that derived peripherals come after +// base peripherals. This is necessary for some SVD files. +func orderPeripherals(input []SVDPeripheral) []*SVDPeripheral { + var sortedPeripherals []*SVDPeripheral + var missingBasePeripherals []*SVDPeripheral + knownBasePeripherals := map[string]struct{}{} + for i := range input { + p := &input[i] + groupName := p.GroupName + if groupName == "" { + groupName = p.Name + } + knownBasePeripherals[groupName] = struct{}{} + if p.DerivedFrom != "" { + if _, ok := knownBasePeripherals[p.DerivedFrom]; !ok { + missingBasePeripherals = append(missingBasePeripherals, p) + continue + } + } + sortedPeripherals = append(sortedPeripherals, p) + } + + // Let's hope all base peripherals are now included. + sortedPeripherals = append(sortedPeripherals, missingBasePeripherals...) + + return sortedPeripherals +} + +func addInterrupt(interrupts map[string]*Interrupt, name, interruptName string, index int, description string) { + if _, ok := interrupts[name]; ok { + if interrupts[name].Value != index { + // Note: some SVD files like the one for STM32H7x7 contain mistakes. + // Instead of throwing an error, simply log it. + fmt.Fprintf(os.Stderr, "interrupt with the same name has different indexes: %s (%d vs %d)\n", + name, interrupts[name].Value, index) + } + parts := strings.Split(interrupts[name].Description, " // ") + hasDescription := false + for _, part := range parts { + if part == description { + hasDescription = true + } + } + if !hasDescription { + interrupts[name].Description += " // " + description + } + } else { + interrupts[name] = &Interrupt{ + Name: name, + HandlerName: interruptName + "_IRQHandler", + PeripheralIndex: len(interrupts), + Value: index, + Description: description, + } + } +} + +func parseBitfields(groupName, regName string, fieldEls []*SVDField, bitfieldPrefix string) ([]Constant, []Bitfield) { + var fields []Constant + var bitfields []Bitfield + enumSeen := map[string]int64{} + for _, fieldEl := range fieldEls { + // Some bitfields (like the STM32H7x7) contain invalid bitfield + // names like "CNT[31]". Replace invalid characters with "_" when + // needed. + fieldName := cleanName(fieldEl.Name) + if !unicode.IsUpper(rune(fieldName[0])) && !unicode.IsDigit(rune(fieldName[0])) { + fieldName = strings.ToUpper(fieldName) + } + + // Find the lsb/msb that is encoded in various ways. + // Standards are great, that's why there are so many to choose from! + var lsb, msb uint32 + if fieldEl.Lsb != nil && fieldEl.Msb != nil { + // try to use lsb/msb tags + lsb = *fieldEl.Lsb + msb = *fieldEl.Msb + } else if fieldEl.BitOffset != nil && fieldEl.BitWidth != nil { + // try to use bitOffset/bitWidth tags + lsb = *fieldEl.BitOffset + msb = *fieldEl.BitWidth + lsb - 1 + } else if fieldEl.BitRange != nil { + // try use bitRange + // example string: "[20:16]" + parts := strings.Split(strings.Trim(*fieldEl.BitRange, "[]"), ":") + l, err := strconv.ParseUint(parts[1], 0, 32) + if err != nil { + panic(err) + } + lsb = uint32(l) + m, err := strconv.ParseUint(parts[0], 0, 32) + if err != nil { + panic(err) + } + msb = uint32(m) + } else { + // this is an error. what to do? + fmt.Fprintln(os.Stderr, "unable to find lsb/msb in field:", fieldName) + continue + } + + // The enumerated values can be the same as another field, so to avoid + // duplication SVD files can simply refer to another set of enumerated + // values in the same register. + // See: https://www.keil.com/pack/doc/CMSIS/SVD/html/elem_registers.html#elem_enumeratedValues + enumeratedValues := fieldEl.EnumeratedValues + if enumeratedValues.DerivedFrom != "" { + parts := strings.Split(enumeratedValues.DerivedFrom, ".") + if len(parts) == 1 { + found := false + for _, otherFieldEl := range fieldEls { + if otherFieldEl.EnumeratedValues.Name == parts[0] { + found = true + enumeratedValues = otherFieldEl.EnumeratedValues + } + } + if !found { + fmt.Fprintf(os.Stderr, "Warning: could not find enumeratedValue.derivedFrom of %s for register field %s\n", enumeratedValues.DerivedFrom, fieldName) + } + } else { + // The derivedFrom attribute may also point to enumerated values + // in other registers and even peripherals, but this feature + // isn't often used in SVD files. + fmt.Fprintf(os.Stderr, "TODO: enumeratedValue.derivedFrom to a different register: %s\n", enumeratedValues.DerivedFrom) + } + } + + bitfields = append(bitfields, Bitfield{ + Name: fieldName, + Offset: lsb, + Mask: (0xffffffff >> (31 - (msb - lsb))) << lsb, + }) + fields = append(fields, Constant{ + Name: fmt.Sprintf("%s_%s%s_%s_Pos", groupName, bitfieldPrefix, regName, fieldName), + Description: fmt.Sprintf("Position of %s field.", fieldName), + Value: uint64(lsb), + }) + fields = append(fields, Constant{ + Name: fmt.Sprintf("%s_%s%s_%s_Msk", groupName, bitfieldPrefix, regName, fieldName), + Description: fmt.Sprintf("Bit mask of %s field.", fieldName), + Value: (0xffffffffffffffff >> (63 - (msb - lsb))) << lsb, + }) + if lsb == msb { // single bit + fields = append(fields, Constant{ + Name: fmt.Sprintf("%s_%s%s_%s", groupName, bitfieldPrefix, regName, fieldName), + Description: fmt.Sprintf("Bit %s.", fieldName), + Value: 1 << lsb, + }) + } + for _, enumEl := range enumeratedValues.EnumeratedValue { + enumName := enumEl.Name + // Renesas has enum without actual values that we have to skip + if enumEl.Value == "" { + continue + } + + if strings.EqualFold(enumName, "reserved") || !validName.MatchString(enumName) { + continue + } + if !unicode.IsUpper(rune(enumName[0])) && !unicode.IsDigit(rune(enumName[0])) { + enumName = strings.ToUpper(enumName) + } + enumDescription := formatText(enumEl.Description) + var enumValue uint64 + var err error + if strings.HasPrefix(enumEl.Value, "0b") { + val := strings.TrimPrefix(enumEl.Value, "0b") + enumValue, err = strconv.ParseUint(val, 2, 64) + } else { + enumValue, err = strconv.ParseUint(enumEl.Value, 0, 64) + } + if err != nil { + if enumBitSpecifier.MatchString(enumEl.Value) { + // NXP and Renesas SVDs use the form #xx1x, #x0xx, etc for values + enumValue, err = strconv.ParseUint(strings.ReplaceAll(enumEl.Value[1:], "x", "0"), 2, 64) + if err != nil { + panic(err) + } + } else { + panic(err) + } + } + enumName = fmt.Sprintf("%s_%s%s_%s_%s", groupName, bitfieldPrefix, regName, fieldName, enumName) + + // Avoid duplicate values. Duplicate names with the same value are + // allowed, but the same name with a different value is not. Instead + // of trying to work around those cases, remove the value entirely + // as there is probably not one correct answer in such a case. + // For example, SVD files from NXP have enums limited to 20 + // characters, leading to lots of duplicates when these enum names + // are long. Nothing here can really fix those cases. + previousEnumValue, seenBefore := enumSeen[enumName] + if seenBefore { + if previousEnumValue < 0 { + // There was a mismatch before, ignore all equally named fields. + continue + } + if int64(enumValue) != previousEnumValue { + // There is a mismatch. Mark it as such, and remove the + // existing enum bitfield value. + enumSeen[enumName] = -1 + for i, field := range fields { + if field.Name == enumName { + fields = append(fields[:i], fields[i+1:]...) + break + } + } + } + continue + } + enumSeen[enumName] = int64(enumValue) + + fields = append(fields, Constant{ + Name: enumName, + Description: enumDescription, + Value: enumValue, + }) + } + } + return fields, bitfields +} + +type Register struct { + element *SVDRegister + baseAddress uint64 +} + +func NewRegister(element *SVDRegister, baseAddress uint64) *Register { + return &Register{ + element: element, + baseAddress: baseAddress, + } +} + +func (r *Register) name() string { + return strings.ReplaceAll(r.element.Name, "[%s]", "") +} + +func (r *Register) description() string { + return formatText(r.element.Description) +} + +func (r *Register) address() uint64 { + offsetString := r.element.Offset + if offsetString == nil { + offsetString = r.element.AddressOffset + } + addr, err := strconv.ParseUint(*offsetString, 0, 32) + if err != nil { + panic(err) + } + return r.baseAddress + addr +} + +func (r *Register) dim() int { + if r.element.Dim == nil { + return -1 // no dim elements + } + dim, err := strconv.ParseInt(*r.element.Dim, 0, 32) + if err != nil { + panic(err) + } + return int(dim) +} + +func (r *Register) dimIndex() []string { + defer func() { + if err := recover(); err != nil { + fmt.Println("register", r.name()) + panic(err) + } + }() + + dim := r.dim() + if r.element.DimIndex == nil { + if dim <= 0 { + return nil + } + + idx := make([]string, dim) + for i := range idx { + idx[i] = strconv.FormatInt(int64(i), 10) + } + return idx + } + + t := strings.Split(*r.element.DimIndex, "-") + if len(t) == 2 { + // renesas uses hex letters e.g. A-B + if strings.Contains("ABCDEFabcdef", t[0]) { + t[0] = "0x" + t[0] + } + if strings.Contains("ABCDEFabcdef", t[1]) { + t[1] = "0x" + t[1] + } + + x, err := strconv.ParseInt(t[0], 0, 32) + if err != nil { + panic(err) + } + y, err := strconv.ParseInt(t[1], 0, 32) + if err != nil { + panic(err) + } + + if x < 0 || y < x || y-x != int64(dim-1) { + panic("invalid dimIndex") + } + + idx := make([]string, dim) + for i := x; i <= y; i++ { + idx[i-x] = strconv.FormatInt(i, 10) + } + return idx + } else if len(t) > 2 { + panic("invalid dimIndex") + } + + s := strings.Split(*r.element.DimIndex, ",") + if len(s) != dim { + panic("invalid dimIndex") + } + + return s +} + +func (r *Register) size() int { + if r.element.Size != nil { + size, err := strconv.ParseInt(*r.element.Size, 0, 32) + if err != nil { + panic(err) + } + return int(size) / 8 + } + return 4 +} + +func parseRegister(groupName string, regEl *SVDRegister, baseAddress uint64, bitfieldPrefix string) []*PeripheralField { + reg := NewRegister(regEl, baseAddress) + + if reg.dim() != -1 { + dimIncrement, err := strconv.ParseUint(regEl.DimIncrement, 0, 32) + if err != nil { + panic(err) + } + if strings.Contains(reg.name(), "%s") { + // a "spaced array" of registers, special processing required + // we need to generate a separate register for each "element" + var results []*PeripheralField + shortName := strings.ToUpper(strings.ReplaceAll(strings.ReplaceAll(reg.name(), "_%s", ""), "%s", "")) + for i, j := range reg.dimIndex() { + regAddress := reg.address() + (uint64(i) * dimIncrement) + results = append(results, &PeripheralField{ + Name: strings.ToUpper(strings.ReplaceAll(reg.name(), "%s", j)), + Address: regAddress, + Description: reg.description(), + Array: -1, + ElementSize: reg.size(), + ShortName: shortName, + }) + } + // set first result bitfield + results[0].Constants, results[0].Bitfields = parseBitfields(groupName, shortName, regEl.Fields, bitfieldPrefix) + results[0].HasBitfields = len(results[0].Bitfields) > 0 + for i := 1; i < len(results); i++ { + results[i].Bitfields = results[0].Bitfields + results[i].HasBitfields = results[0].HasBitfields + } + return results + } + } + regName := reg.name() + if !unicode.IsUpper(rune(regName[0])) && !unicode.IsDigit(rune(regName[0])) { + regName = strings.ToUpper(regName) + } + regName = cleanName(regName) + + constants, bitfields := parseBitfields(groupName, regName, regEl.Fields, bitfieldPrefix) + return []*PeripheralField{&PeripheralField{ + Name: regName, + Address: reg.address(), + Description: reg.description(), + Constants: constants, + Array: reg.dim(), + ElementSize: reg.size(), + ShortName: regName, + Bitfields: bitfields, + HasBitfields: len(bitfields) > 0, + }} +} + +// The Go module for this device. +func writeGo(outdir string, device *Device, interruptSystem string) error { + outf, err := os.Create(filepath.Join(outdir, device.Metadata.NameLower+".go")) + if err != nil { + return err + } + defer outf.Close() + w := bufio.NewWriter(outf) + + maxInterruptValue := 0 + for _, intr := range device.Interrupts { + if intr.Value > maxInterruptValue { + maxInterruptValue = intr.Value + } + } + + interruptHandlerMap := make(map[string]*Interrupt) + var interruptHandlers []*Interrupt + for _, intr := range device.Interrupts { + if _, ok := interruptHandlerMap[intr.HandlerName]; !ok { + interruptHandlerMap[intr.HandlerName] = intr + interruptHandlers = append(interruptHandlers, intr) + } + } + + t := template.Must(template.New("go").Funcs(template.FuncMap{ + "bytesNeeded": func(i, j uint64) uint64 { return j - i }, + "isMultiline": isMultiline, + "splitLine": splitLine, + }).Parse(`// Automatically generated file. DO NOT EDIT. +// Generated by gen-device-svd.go from {{.device.Metadata.File}}, see {{.device.Metadata.DescriptorSource}} + +//go:build {{.pkgName}} && {{.device.Metadata.NameLower}} + +/* +{{.device.Metadata.Description}} +*/ +{{.device.Metadata.LicenseBlock}} +package {{.pkgName}} + +import ( + "github.com/goplus/emb/runtime/volatile" + "unsafe" +) + +// Some information about this device. +const ( + Device = "{{.device.Metadata.Name}}" +{{- if .device.Metadata.HasCPUInfo }} + CPU = "{{.device.Metadata.CPUName}}" + FPUPresent = {{.device.Metadata.FPUPresent}} + NVICPrioBits = {{.device.Metadata.NVICPrioBits}} +{{- end }} +) + +// Interrupt numbers. +const ( +{{- range .device.Interrupts}} + {{- if .Description}} + {{- range .Description|splitLine}} + // {{.}} + {{- end}} + {{- end}} + IRQ_{{.Name}} = {{.Value}} + {{- "\n"}} +{{- end}} + // Highest interrupt number on this device. + IRQ_max = {{.interruptMax}} +) + +// Pseudo function call that is replaced by the compiler with the actual +// functions registered through interrupt.New. +// +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int){ + // TODO: implement interrupt handler dispatch mechanism +} + +{{- if eq .interruptSystem "hardware"}} +{{- range .interruptHandlers}} +//export {{.HandlerName}} +func interrupt{{.Name}}() { + callHandlers(IRQ_{{.Name}}) +} +{{- end}} +{{- end}} + +{{- if eq .interruptSystem "software"}} +func HandleInterrupt(num int) { + switch num { + {{- range .interruptHandlers}} + case IRQ_{{.Name}}: + callHandlers(IRQ_{{.Name}}) + {{- end}} + } +} +{{- end}} + +// Peripherals. +var ( +{{- range .device.Peripherals}} + {{- if .Description}} + {{- range .Description|splitLine}} + // {{.}} + {{- end}} + {{- end}} + {{.Name}} = (*{{.GroupName}}_Type)(unsafe.Pointer(uintptr(0x{{printf "%x" .BaseAddress}}))) + {{- "\n"}} +{{- end}} +) + +`)) + err = t.Execute(w, map[string]interface{}{ + "device": device, + "pkgName": filepath.Base(strings.TrimRight(outdir, "/")), + "interruptMax": maxInterruptValue, + "interruptSystem": interruptSystem, + "interruptHandlers": interruptHandlers, + }) + if err != nil { + return err + } + + // Define peripheral struct types. + for _, peripheral := range device.Peripherals { + if peripheral.Registers == nil { + // This peripheral was derived from another peripheral. No new type + // needs to be defined for it. + continue + } + fmt.Fprintln(w) + if peripheral.Description != "" { + for _, l := range splitLine(peripheral.Description) { + fmt.Fprintf(w, "// %s\n", l) + } + } + fmt.Fprintf(w, "type %s_Type struct {\n", peripheral.GroupName) + + address := peripheral.BaseAddress + type clusterInfo struct { + name string + description string + address uint64 + size uint64 + registers []*PeripheralField + } + clusters := []clusterInfo{} + for _, register := range peripheral.Registers { + if register.Registers == nil && address > register.Address { + // In Nordic SVD files, these registers are deprecated or + // duplicates, so can be ignored. + //fmt.Fprintf(os.Stderr, "skip: %s.%s 0x%x - 0x%x %d\n", peripheral.Name, register.name, address, register.address, register.elementSize) + // remove bit fields from such register + register.Bitfields = nil + continue + } + + var regType string + switch register.ElementSize { + case 8: + regType = "volatile.Register64" + case 4: + regType = "volatile.Register32" + case 2: + regType = "volatile.Register16" + case 1: + regType = "volatile.Register8" + default: + regType = "volatile.Register32" + } + + // insert padding, if needed + if address < register.Address { + bytesNeeded := register.Address - address + if bytesNeeded == 1 { + w.WriteString("\t_ byte\n") + } else { + fmt.Fprintf(w, "\t_ [%d]byte\n", bytesNeeded) + } + address = register.Address + } + + lastCluster := false + if register.Registers != nil { + // This is a cluster, not a register. Create the cluster type. + regType = peripheral.GroupName + "_" + register.Name + clusters = append(clusters, clusterInfo{regType, register.Description, register.Address, uint64(register.ElementSize), register.Registers}) + regType = regType + "_Type" + subaddress := register.Address + for _, subregister := range register.Registers { + + if subaddress != subregister.Address { + bytesNeeded := subregister.Address - subaddress + subaddress += bytesNeeded + } + var subregSize uint64 + if subregister.Array != -1 { + subregSize = uint64(subregister.Array * subregister.ElementSize) + } else { + subregSize = uint64(subregister.ElementSize) + } + subaddress += subregSize + } + if register.Array == -1 { + lastCluster = true + } + address = subaddress + } + + if register.Array != -1 { + regType = fmt.Sprintf("[%d]%s", register.Array, regType) + } + fmt.Fprintf(w, "\t%s %s // 0x%X\n", register.Name, regType, register.Address-peripheral.BaseAddress) + + // next address + if lastCluster { + lastCluster = false + } else if register.Array != -1 { + address = register.Address + uint64(register.ElementSize*register.Array) + } else { + address = register.Address + uint64(register.ElementSize) + } + } + w.WriteString("}\n") + + for _, register := range peripheral.Registers { + regName := register.Name + writeGoRegisterBitfieldType(w, register, peripheral.GroupName, regName) + } + + // Define clusters + for i := 0; i < len(clusters); i++ { + cluster := clusters[i] + if len(cluster.registers) == 0 { + continue + } + + if _, ok := device.PeripheralDict[cluster.name]; ok { + continue + } + + fmt.Fprintln(w) + if cluster.description != "" { + for _, l := range splitLine(cluster.description) { + fmt.Fprintf(w, "// %s\n", l) + } + } + fmt.Fprintf(w, "type %s_Type struct {\n", cluster.name) + + address := cluster.address + + for _, register := range cluster.registers { + if register.Registers == nil && address > register.Address { + // In Nordic SVD files, these registers are deprecated or + // duplicates, so can be ignored. + //fmt.Fprintf(os.Stderr, "skip: %s.%s 0x%x - 0x%x %d\n", peripheral.Name, register.name, address, register.address, register.elementSize) + continue + } + var regType string + switch register.ElementSize { + case 8: + regType = "volatile.Register64" + case 4: + regType = "volatile.Register32" + case 2: + regType = "volatile.Register16" + case 1: + regType = "volatile.Register8" + default: + regType = "volatile.Register32" + } + + // insert padding, if needed + if address < register.Address { + bytesNeeded := register.Address - address + if bytesNeeded == 1 { + w.WriteString("\t_ byte\n") + } else { + fmt.Fprintf(w, "\t_ [%d]byte\n", bytesNeeded) + } + address = register.Address + } + + lastCluster := false + if register.Registers != nil { + // This is a cluster, not a register. Create the cluster type. + regType = peripheral.GroupName + "_" + register.Name + clusters = append(clusters, clusterInfo{regType, register.Description, register.Address, uint64(register.ElementSize), register.Registers}) + regType = regType + "_Type" + + subaddress := register.Address + for _, subregister := range register.Registers { + if subaddress != subregister.Address { + bytesNeeded := subregister.Address - subaddress + subaddress += bytesNeeded + } + var subregSize uint64 + if subregister.Array != -1 { + subregSize = uint64(subregister.Array * subregister.ElementSize) + } else { + subregSize = uint64(subregister.ElementSize) + } + subaddress += subregSize + } + if register.Array == -1 { + lastCluster = true + } + address = subaddress + } + + if register.Array != -1 { + regType = fmt.Sprintf("[%d]%s", register.Array, regType) + } + fmt.Fprintf(w, "\t%s %s // 0x%X\n", register.Name, regType, register.Address-peripheral.BaseAddress) + + // next address + if lastCluster { + lastCluster = false + } else if register.Array != -1 { + address = register.Address + uint64(register.ElementSize*register.Array) + } else { + address = register.Address + uint64(register.ElementSize) + } + } + // make sure the structure is full + if cluster.size > (address - cluster.registers[0].Address) { + bytesNeeded := cluster.size - (address - cluster.registers[0].Address) + if bytesNeeded == 1 { + w.WriteString("\t_ byte\n") + } else { + fmt.Fprintf(w, "\t_ [%d]byte\n", bytesNeeded) + } + } else if cluster.size != (address - cluster.registers[0].Address) { + println("peripheral:", peripheral.Name, "cluster:", cluster.name, "size:", cluster.size, "struct size:", (address - cluster.registers[0].Address)) + } + w.WriteString("}\n") + + for _, register := range cluster.registers { + regName := register.Name + if register.Array == -1 { + writeGoRegisterBitfieldType(w, register, cluster.name, regName) + } + } + } + } + + // Define bitfields. + for _, peripheral := range device.Peripherals { + if peripheral.Registers == nil { + // This peripheral was derived from another peripheral. Constants are + // already defined. + continue + } + fmt.Fprintf(w, "\n// Constants for %s", peripheral.Name) + if isMultiline(peripheral.Description) { + for _, l := range splitLine(peripheral.Description) { + fmt.Fprintf(w, "\n// %s", l) + } + } else if peripheral.Description != "" { + fmt.Fprintf(w, ": %s", peripheral.Description) + } + + fmt.Fprint(w, "\nconst(") + for _, register := range peripheral.Registers { + if len(register.Constants) != 0 { + writeGoRegisterConstants(w, register, register.Name) + } + if register.Registers == nil { + continue + } + for _, subregister := range register.Registers { + writeGoRegisterConstants(w, subregister, register.Name+"."+subregister.Name) + } + } + w.WriteString(")\n") + } + + return w.Flush() +} + +func writeGoRegisterConstants(w *bufio.Writer, register *PeripheralField, name string) { + w.WriteString("\n\t// " + name) + if register.Description != "" { + if isMultiline(register.Description) { + for _, l := range splitLine(register.Description) { + w.WriteString("\n\t// " + l) + } + } else { + w.WriteString(": " + register.Description) + } + } + w.WriteByte('\n') + for _, bitfield := range register.Constants { + if bitfield.Description != "" { + for _, l := range splitLine(bitfield.Description) { + w.WriteString("\t// " + l + "\n") + } + } + fmt.Fprintf(w, "\t%s = 0x%x\n", bitfield.Name, bitfield.Value) + } +} + +func writeGoRegisterBitfieldType(w *bufio.Writer, register *PeripheralField, peripheralName, registerName string) { + if len(register.Bitfields) == 0 { + return + } + w.WriteString("\n// " + peripheralName + "." + registerName) + if register.Description != "" { + if isMultiline(register.Description) { + for _, l := range splitLine(register.Description) { + w.WriteString("\n\t// " + l) + } + } else { + w.WriteString(": " + register.Description) + } + } + w.WriteByte('\n') + var bitSize int + var maxMask uint32 + switch register.ElementSize { + case 8: + bitSize = 64 + maxMask = 0xffffffff + // maxMask = 0xffffffffffffffff // TODO how to handle 64-bit fields + case 4: + bitSize = 32 + maxMask = 0xffffffff + case 2: + bitSize = 16 + maxMask = 0xffff + case 1: + bitSize = 8 + maxMask = 0xff + default: + bitSize = 32 + maxMask = 0xffffffff + } + + typeName := fmt.Sprintf("%s_Type", peripheralName) + + for _, bitfield := range register.Bitfields { + idxArg := "" + regAccess := "&o." + registerName + ".Reg" + if register.Array != -1 { + idxArg = "idx int, " + regAccess = "&o." + registerName + "[idx].Reg" + } + var funcSuffix string + if maxMask == bitfield.Mask || registerName == bitfield.Name { + funcSuffix = registerName + } else { + funcSuffix = registerName + "_" + bitfield.Name + } + fmt.Fprintf(w, "func (o *%s) Set%s(%s value uint%d) {\n", typeName, funcSuffix, idxArg, bitSize) + if maxMask == bitfield.Mask { + fmt.Fprintf(w, "\tvolatile.StoreUint%d(%s, value)\n", bitSize, regAccess) + } else if bitfield.Offset > 0 { + fmt.Fprintf(w, "\tvolatile.StoreUint%d(%s, volatile.LoadUint%d(%s)&^(0x%x)|value<<%d)\n", bitSize, regAccess, bitSize, regAccess, bitfield.Mask, bitfield.Offset) + } else { + fmt.Fprintf(w, "\tvolatile.StoreUint%d(%s, volatile.LoadUint%d(%s)&^(0x%x)|value)\n", bitSize, regAccess, bitSize, regAccess, bitfield.Mask) + } + w.WriteString("}\n") + fmt.Fprintf(w, "func (o *%s) Get%s(%s) uint%d {\n", typeName, funcSuffix, idxArg, bitSize) + if maxMask == bitfield.Mask { + fmt.Fprintf(w, "\treturn volatile.LoadUint%d(%s)\n", bitSize, regAccess) + } else if bitfield.Offset > 0 { + fmt.Fprintf(w, "\treturn (volatile.LoadUint%d(%s)&0x%x) >> %d\n", bitSize, regAccess, bitfield.Mask, bitfield.Offset) + } else { + fmt.Fprintf(w, "\treturn volatile.LoadUint%d(%s)&0x%x\n", bitSize, regAccess, bitfield.Mask) + } + w.WriteString("}\n") + } +} + +// The interrupt vector, which is hard to write directly in Go. +func writeAsm(outdir string, device *Device) error { + outf, err := os.Create(filepath.Join(outdir, device.Metadata.NameLower+".s")) + if err != nil { + return err + } + defer outf.Close() + w := bufio.NewWriter(outf) + + t := template.Must(template.New("go").Parse(`// Automatically generated file. DO NOT EDIT. +// Generated by gen-device-svd.go from {{.File}}, see {{.DescriptorSource}} + +/* +{{.Description}} +*/ + +{{.LicenseBlock}} + +.syntax unified + +// This is the default handler for interrupts, if triggered but not defined. +.section .text.Default_Handler +.global Default_Handler +.type Default_Handler, %function +Default_Handler: + wfe + b Default_Handler +.size Default_Handler, .-Default_Handler + +// Avoid the need for repeated .weak and .set instructions. +.macro IRQ handler + .weak \handler + .set \handler, Default_Handler +.endm + +// Must set the "a" flag on the section: +// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 +// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version +.section .isr_vector, "a", %progbits +.global __isr_vector +__isr_vector: + // Interrupt vector as defined by Cortex-M, starting with the stack top. + // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading + // _stack_top and Reset_Handler. + .long _stack_top + .long Reset_Handler + .long NMI_Handler + .long HardFault_Handler + .long MemoryManagement_Handler + .long BusFault_Handler + .long UsageFault_Handler + .long 0 + .long 0 + .long 0 + .long 0 + .long SVC_Handler + .long DebugMon_Handler + .long 0 + .long PendSV_Handler + .long SysTick_Handler + + // Extra interrupts for peripherals defined by the hardware vendor. +`)) + err = t.Execute(w, device.Metadata) + if err != nil { + return err + } + num := 0 + for _, intr := range device.Interrupts { + if intr.Value == num-1 { + continue + } + if intr.Value < num { + panic("interrupt numbers are not sorted") + } + for intr.Value > num { + w.WriteString(" .long 0\n") + num++ + } + num++ + fmt.Fprintf(w, " .long %s\n", intr.HandlerName) + } + + w.WriteString(` + // Define default implementations for interrupts, redirecting to + // Default_Handler when not implemented. + IRQ NMI_Handler + IRQ HardFault_Handler + IRQ MemoryManagement_Handler + IRQ BusFault_Handler + IRQ UsageFault_Handler + IRQ SVC_Handler + IRQ DebugMon_Handler + IRQ PendSV_Handler + IRQ SysTick_Handler +`) + for _, intr := range device.Interrupts { + fmt.Fprintf(w, " IRQ %s_IRQHandler\n", intr.Name) + } + w.WriteString(` +.size __isr_vector, .-__isr_vector +`) + return w.Flush() +} + +func generate(indir, outdir, sourceURL, interruptSystem string) error { + if _, err := os.Stat(indir); errors.Is(err, fs.ErrNotExist) { + fmt.Fprintln(os.Stderr, "cannot find input directory:", indir) + os.Exit(1) + } + os.MkdirAll(outdir, 0777) + + infiles, err := filepath.Glob(filepath.Join(indir, "*.svd")) + if err != nil { + fmt.Fprintln(os.Stderr, "could not read .svd files:", err) + os.Exit(1) + } + sort.Strings(infiles) + for _, infile := range infiles { + fmt.Println(infile) + device, err := readSVD(infile, sourceURL) + if err != nil { + return fmt.Errorf("failed to read: %w", err) + } + err = writeGo(outdir, device, interruptSystem) + if err != nil { + return fmt.Errorf("failed to write Go file: %w", err) + } + switch interruptSystem { + case "software": + // Nothing to do. + case "hardware": + // current define in llgo + // err = writeAsm(outdir, device) + // if err != nil { + // return fmt.Errorf("failed to write assembly file: %w", err) + // } + default: + return fmt.Errorf("unknown interrupt system: %s", interruptSystem) + } + } + return nil +} + +func main() { + sourceURL := flag.String("source", "", "source SVD file") + interruptSystem := flag.String("interrupts", "hardware", "interrupt system in use (software, hardware)") + flag.Parse() + if flag.NArg() != 2 { + fmt.Fprintln(os.Stderr, "provide exactly two arguments: input directory (with .svd files) and output directory for generated files") + flag.PrintDefaults() + return + } + indir := flag.Arg(0) + outdir := flag.Arg(1) + err := generate(indir, outdir, *sourceURL, *interruptSystem) + if err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} diff --git a/device/arm/arm.go b/device/arm/arm.go index 1f26b7f..b94283f 100644 --- a/device/arm/arm.go +++ b/device/arm/arm.go @@ -29,11 +29,18 @@ // POSSIBILITY OF SUCH DAMAGE. package arm -import "C" +// NOTE(zzy): import "C" is not needed here and causes compilation errors. +// The .c and .S files are already stored in LLGO at /llgo/targets/device/, +// including import "C" will cause undefined symbol errors like: +// - undefined: SCS_BASE +// - undefined: Asm +// when building with: llgo build -target cortex-m-qemu . + import ( "errors" - "runtime/volatile" "unsafe" + + "github.com/goplus/emb/runtime/volatile" ) var errCycleCountTooLarge = errors.New("requested cycle count is too large, overflows 24 bit counter") @@ -41,7 +48,9 @@ var errCycleCountTooLarge = errors.New("requested cycle count is too large, over // Run the given assembly code. The code will be marked as having side effects, // as it doesn't produce output and thus would normally be eliminated by the // optimizer. -func Asm(asm string) +// +//llgo:link Asm llgo.asm +func Asm(asm string) {} // Run the given inline assembly. The code will be marked as having side // effects, as it would otherwise be optimized away. The inline assembly string @@ -56,22 +65,49 @@ func Asm(asm string) // // You can use {} in the asm string (which expands to a register) to set the // return value. -func AsmFull(asm string, regs map[string]interface{}) uintptr +// +//llgo:link AsmFull llgo.asm +func AsmFull(asm string, regs map[string]interface{}) uintptr { return 0 } // Run the following system call (SVCall) with 0 arguments. -func SVCall0(num uintptr) uintptr +func SVCall0(num uintptr) uintptr { + // TODO(zzy): implement system call (SVCall) functionality for ARM Cortex-M + // TinyGo compiler implementation: tinygo/compiler/inlineasm.go emitSVCall function + panic("TODO: SVCall0") + return 0 +} // Run the following system call (SVCall) with 1 argument. -func SVCall1(num uintptr, a1 interface{}) uintptr +func SVCall1(num uintptr, a1 interface{}) uintptr { + // TODO(zzy): implement system call (SVCall) functionality for ARM Cortex-M + // TinyGo compiler implementation: tinygo/compiler/inlineasm.go emitSVCall function + panic("TODO: SVCall1") + return 0 +} // Run the following system call (SVCall) with 2 arguments. -func SVCall2(num uintptr, a1, a2 interface{}) uintptr +func SVCall2(num uintptr, a1, a2 interface{}) uintptr { + // TODO(zzy): implement system call (SVCall) functionality for ARM Cortex-M + // TinyGo compiler implementation: tinygo/compiler/inlineasm.go emitSVCall function + panic("TODO: SVCall2") + return 0 +} // Run the following system call (SVCall) with 3 arguments. -func SVCall3(num uintptr, a1, a2, a3 interface{}) uintptr +func SVCall3(num uintptr, a1, a2, a3 interface{}) uintptr { + // TODO(zzy): implement system call (SVCall) functionality for ARM Cortex-M + // TinyGo compiler implementation: tinygo/compiler/inlineasm.go emitSVCall function + panic("TODO: SVCall3") + return 0 +} // Run the following system call (SVCall) with 4 arguments. -func SVCall4(num uintptr, a1, a2, a3, a4 interface{}) uintptr +func SVCall4(num uintptr, a1, a2, a3, a4 interface{}) uintptr { + // TODO(zzy): implement system call (SVCall) functionality for ARM Cortex-M + // TinyGo compiler implementation: tinygo/compiler/inlineasm.go emitSVCall function + panic("TODO: SVCall4") + return 0 +} const ( SCS_BASE = 0xE000E000 @@ -180,14 +216,17 @@ func SetPriority(irq uint32, priority uint32) { // DisableInterrupts disables all interrupts, and returns the old interrupt // state. +// DisableInterrupts/EnableInterrupts functions available in LLGO +// Implementation location: llgo/targets/device/arm/interrupts.c +// NOTE(zzy): Available for future linkage via //go:linkname // -//export DisableInterrupts +//go:linkname DisableInterrupts DisableInterrupts func DisableInterrupts() uintptr // EnableInterrupts enables all interrupts again. The value passed in must be // the mask returned by DisableInterrupts. // -//export EnableInterrupts +//go:linkname EnableInterrupts EnableInterrupts func EnableInterrupts(mask uintptr) // Set up the system timer to generate periodic tick events. diff --git a/device/arm/cortexm.S b/device/arm/cortexm.S deleted file mode 100644 index e9b15aa..0000000 --- a/device/arm/cortexm.S +++ /dev/null @@ -1,37 +0,0 @@ -.syntax unified -.cfi_sections .debug_frame - -.section .text.HardFault_Handler -.global HardFault_Handler -.type HardFault_Handler, %function -HardFault_Handler: - .cfi_startproc - // Put the old stack pointer in the first argument, for easy debugging. This - // is especially useful on Cortex-M0, which supports far fewer debug - // facilities. - mov r0, sp - - // Load the default stack pointer from address 0 so that we can call normal - // functions again that expect a working stack. However, it will corrupt the - // old stack so the function below must not attempt to recover from this - // fault. - movs r3, #0 - ldr r3, [r3] - mov sp, r3 - - // Continue handling this error in Go. - bl handleHardFault - .cfi_endproc -.size HardFault_Handler, .-HardFault_Handler - -// This is a convenience function for semihosting support. -// At some point, this should be replaced by inline assembly. -.section .text.SemihostingCall -.global SemihostingCall -.type SemihostingCall, %function -SemihostingCall: - .cfi_startproc - bkpt 0xab - bx lr - .cfi_endproc -.size SemihostingCall, .-SemihostingCall diff --git a/device/arm/interrupts.c b/device/arm/interrupts.c deleted file mode 100644 index d94a313..0000000 --- a/device/arm/interrupts.c +++ /dev/null @@ -1,22 +0,0 @@ -#include - -void EnableInterrupts(uintptr_t mask) { - asm volatile( - "msr PRIMASK, %0" - : - : "r"(mask) - : "memory" - ); -} - -uintptr_t DisableInterrupts() { - uintptr_t mask; - asm volatile( - "mrs %0, PRIMASK\n\t" - "cpsid i" - : "=r"(mask) - : - : "memory" - ); - return mask; -} \ No newline at end of file diff --git a/device/arm/scb.go b/device/arm/scb.go index 528b7cb..4995dba 100644 --- a/device/arm/scb.go +++ b/device/arm/scb.go @@ -6,7 +6,7 @@ package arm import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) diff --git a/device/arm/semihosting.go b/device/arm/semihosting.go index 10b6497..69d2eb5 100644 --- a/device/arm/semihosting.go +++ b/device/arm/semihosting.go @@ -1,5 +1,7 @@ package arm +import _ "unsafe" + // Semihosting commands. // http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471c/Bgbjhiea.html const ( diff --git a/device/arm64/arm64.go b/device/arm64/arm64.go index 7e8cea6..3e1407a 100644 --- a/device/arm64/arm64.go +++ b/device/arm64/arm64.go @@ -3,7 +3,9 @@ package arm64 // Run the given assembly code. The code will be marked as having side effects, // as it doesn't produce output and thus would normally be eliminated by the // optimizer. -func Asm(asm string) +// +//llgo:link Asm llgo.asm +func Asm(asm string) {} // Run the given inline assembly. The code will be marked as having side // effects, as it would otherwise be optimized away. The inline assembly string @@ -18,19 +20,46 @@ func Asm(asm string) // // You can use {} in the asm string (which expands to a register) to set the // return value. -func AsmFull(asm string, regs map[string]interface{}) uintptr +// +//llgo:link AsmFull llgo.asm +func AsmFull(asm string, regs map[string]interface{}) uintptr { return 0 } // Run the following system call (SVCall) with 0 arguments. -func SVCall0(num uintptr) uintptr +func SVCall0(num uintptr) uintptr { + // TODO(zzy): implement system call (SVCall) functionality for ARM64 + // TinyGo compiler implementation: tinygo/compiler/inlineasm.go emitSV64Call function + panic("TODO: SVCall0") + return 0 +} // Run the following system call (SVCall) with 1 argument. -func SVCall1(num uintptr, a1 interface{}) uintptr +func SVCall1(num uintptr, a1 interface{}) uintptr { + // TODO(zzy): implement system call (SVCall) functionality for ARM64 + // TinyGo compiler implementation: tinygo/compiler/inlineasm.go emitSV64Call function + panic("TODO: SVCall1") + return 0 +} // Run the following system call (SVCall) with 2 arguments. -func SVCall2(num uintptr, a1, a2 interface{}) uintptr +func SVCall2(num uintptr, a1, a2 interface{}) uintptr { + // TODO(zzy): implement system call (SVCall) functionality for ARM64 + // TinyGo compiler implementation: tinygo/compiler/inlineasm.go emitSV64Call function + panic("TODO: SVCall2") + return 0 +} // Run the following system call (SVCall) with 3 arguments. -func SVCall3(num uintptr, a1, a2, a3 interface{}) uintptr +func SVCall3(num uintptr, a1, a2, a3 interface{}) uintptr { + // TODO(zzy): implement system call (SVCall) functionality for ARM64 + // TinyGo compiler implementation: tinygo/compiler/inlineasm.go emitSV64Call function + panic("TODO: SVCall3") + return 0 +} // Run the following system call (SVCall) with 4 arguments. -func SVCall4(num uintptr, a1, a2, a3, a4 interface{}) uintptr +func SVCall4(num uintptr, a1, a2, a3, a4 interface{}) uintptr { + // TODO(zzy): implement system call (SVCall) functionality for ARM64 + // TinyGo compiler implementation: tinygo/compiler/inlineasm.go emitSV64Call function + panic("TODO: SVCall4") + return 0 +} diff --git a/device/asm.go b/device/asm.go index 49ddbc3..5c640f5 100644 --- a/device/asm.go +++ b/device/asm.go @@ -3,7 +3,9 @@ package device // Run the given assembly code. The code will be marked as having side effects, // as it doesn't produce output and thus would normally be eliminated by the // optimizer. -func Asm(asm string) +// +//llgo:link Asm llgo.asm +func Asm(asm string) {} // Run the given inline assembly. The code will be marked as having side // effects, as it would otherwise be optimized away. The inline assembly string @@ -18,4 +20,8 @@ func Asm(asm string) // // You can use {} in the asm string (which expands to a register) to set the // return value. -func AsmFull(asm string, regs map[string]interface{}) uintptr +// +//llgo:link AsmFull llgo.asm +func AsmFull(asm string, regs map[string]interface{}) uintptr { + return 0 +} diff --git a/device/avr/at90can128.go b/device/avr/at90can128.go index 0eb35e3..85290a4 100644 --- a/device/avr/at90can128.go +++ b/device/avr/at90can128.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -63,8 +63,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90can128.ld b/device/avr/at90can128.ld deleted file mode 100644 index af9c5f8..0000000 --- a/device/avr/at90can128.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90CAN128.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x20000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 37; diff --git a/device/avr/at90can128.s b/device/avr/at90can128.s deleted file mode 100644 index d6adf63..0000000 --- a/device/avr/at90can128.s +++ /dev/null @@ -1,98 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90CAN128.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_CANIT - jmp __vector_OVRIT - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_CANIT - IRQ __vector_OVRIT - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY diff --git a/device/avr/at90can32.go b/device/avr/at90can32.go index a8aeecf..f6a547e 100644 --- a/device/avr/at90can32.go +++ b/device/avr/at90can32.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -63,8 +63,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90can32.ld b/device/avr/at90can32.ld deleted file mode 100644 index 416e7d7..0000000 --- a/device/avr/at90can32.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90CAN32.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 37; diff --git a/device/avr/at90can32.s b/device/avr/at90can32.s deleted file mode 100644 index c4b74f3..0000000 --- a/device/avr/at90can32.s +++ /dev/null @@ -1,98 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90CAN32.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_CANIT - jmp __vector_OVRIT - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_CANIT - IRQ __vector_OVRIT - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY diff --git a/device/avr/at90can64.go b/device/avr/at90can64.go index f0e467c..e5dadc4 100644 --- a/device/avr/at90can64.go +++ b/device/avr/at90can64.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -63,8 +63,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90can64.ld b/device/avr/at90can64.ld deleted file mode 100644 index 02df5bc..0000000 --- a/device/avr/at90can64.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90CAN64.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 37; diff --git a/device/avr/at90can64.s b/device/avr/at90can64.s deleted file mode 100644 index df13677..0000000 --- a/device/avr/at90can64.s +++ /dev/null @@ -1,98 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90CAN64.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_CANIT - jmp __vector_OVRIT - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_CANIT - IRQ __vector_OVRIT - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY diff --git a/device/avr/at90pwm1.go b/device/avr/at90pwm1.go index ae654d1..924cedf 100644 --- a/device/avr/at90pwm1.go +++ b/device/avr/at90pwm1.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -58,8 +58,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90pwm1.ld b/device/avr/at90pwm1.ld deleted file mode 100644 index ff8681d..0000000 --- a/device/avr/at90pwm1.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90PWM1.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 32; diff --git a/device/avr/at90pwm1.s b/device/avr/at90pwm1.s deleted file mode 100644 index b6465ca..0000000 --- a/device/avr/at90pwm1.s +++ /dev/null @@ -1,88 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90PWM1.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_PSC2_CAPT - rjmp __vector_PSC2_EC - rjmp __vector_PSC1_CAPT - rjmp __vector_PSC1_EC - rjmp __vector_PSC0_CAPT - rjmp __vector_PSC0_EC - rjmp __vector_ANALOG_COMP_0 - rjmp __vector_ANALOG_COMP_1 - rjmp __vector_ANALOG_COMP_2 - rjmp __vector_INT0 - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_RESERVED15 - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMP_A - rjmp __vector_TIMER0_OVF - rjmp __vector_ADC - rjmp __vector_INT1 - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_INT2 - rjmp __vector_WDT - rjmp __vector_EE_READY - rjmp __vector_TIMER0_COMPB - rjmp __vector_INT3 - rjmp __vector_RESERVED30 - rjmp __vector_RESERVED31 - rjmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_PSC2_CAPT - IRQ __vector_PSC2_EC - IRQ __vector_PSC1_CAPT - IRQ __vector_PSC1_EC - IRQ __vector_PSC0_CAPT - IRQ __vector_PSC0_EC - IRQ __vector_ANALOG_COMP_0 - IRQ __vector_ANALOG_COMP_1 - IRQ __vector_ANALOG_COMP_2 - IRQ __vector_INT0 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_RESERVED15 - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP_A - IRQ __vector_TIMER0_OVF - IRQ __vector_ADC - IRQ __vector_INT1 - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_INT2 - IRQ __vector_WDT - IRQ __vector_EE_READY - IRQ __vector_TIMER0_COMPB - IRQ __vector_INT3 - IRQ __vector_RESERVED30 - IRQ __vector_RESERVED31 - IRQ __vector_SPM_READY diff --git a/device/avr/at90pwm161.go b/device/avr/at90pwm161.go index 68b4163..6a62054 100644 --- a/device/avr/at90pwm161.go +++ b/device/avr/at90pwm161.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -46,8 +46,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90pwm161.ld b/device/avr/at90pwm161.ld deleted file mode 100644 index 0e5850f..0000000 --- a/device/avr/at90pwm161.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90PWM161.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 20; diff --git a/device/avr/at90pwm161.s b/device/avr/at90pwm161.s deleted file mode 100644 index 9a8ef75..0000000 --- a/device/avr/at90pwm161.s +++ /dev/null @@ -1,64 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90PWM161.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_PSC2_CAPT - jmp __vector_PSC2_EC - jmp __vector_PSC2_EEC - jmp __vector_PSC0_CAPT - jmp __vector_PSC0_EC - jmp __vector_PSC0_EEC - jmp __vector_ANALOG_COMP_1 - jmp __vector_ANALOG_COMP_2 - jmp __vector_ANALOG_COMP_3 - jmp __vector_INT0 - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_OVF - jmp __vector_ADC - jmp __vector_INT1 - jmp __vector_SPI_STC - jmp __vector_INT2 - jmp __vector_WDT - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_PSC2_CAPT - IRQ __vector_PSC2_EC - IRQ __vector_PSC2_EEC - IRQ __vector_PSC0_CAPT - IRQ __vector_PSC0_EC - IRQ __vector_PSC0_EEC - IRQ __vector_ANALOG_COMP_1 - IRQ __vector_ANALOG_COMP_2 - IRQ __vector_ANALOG_COMP_3 - IRQ __vector_INT0 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_OVF - IRQ __vector_ADC - IRQ __vector_INT1 - IRQ __vector_SPI_STC - IRQ __vector_INT2 - IRQ __vector_WDT - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/at90pwm216.go b/device/avr/at90pwm216.go index 528fa97..70f9b98 100644 --- a/device/avr/at90pwm216.go +++ b/device/avr/at90pwm216.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -58,8 +58,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90pwm216.ld b/device/avr/at90pwm216.ld deleted file mode 100644 index cd9e96c..0000000 --- a/device/avr/at90pwm216.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90PWM216.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 32; diff --git a/device/avr/at90pwm216.s b/device/avr/at90pwm216.s deleted file mode 100644 index 3c0b6a5..0000000 --- a/device/avr/at90pwm216.s +++ /dev/null @@ -1,88 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90PWM216.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_PSC2_CAPT - jmp __vector_PSC2_EC - jmp __vector_PSC1_CAPT - jmp __vector_PSC1_EC - jmp __vector_PSC0_CAPT - jmp __vector_PSC0_EC - jmp __vector_ANALOG_COMP_0 - jmp __vector_ANALOG_COMP_1 - jmp __vector_ANALOG_COMP_2 - jmp __vector_INT0 - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_RESERVED15 - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP_A - jmp __vector_TIMER0_OVF - jmp __vector_ADC - jmp __vector_INT1 - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART_TX - jmp __vector_INT2 - jmp __vector_WDT - jmp __vector_EE_READY - jmp __vector_TIMER0_COMPB - jmp __vector_INT3 - jmp __vector_RESERVED30 - jmp __vector_RESERVED31 - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_PSC2_CAPT - IRQ __vector_PSC2_EC - IRQ __vector_PSC1_CAPT - IRQ __vector_PSC1_EC - IRQ __vector_PSC0_CAPT - IRQ __vector_PSC0_EC - IRQ __vector_ANALOG_COMP_0 - IRQ __vector_ANALOG_COMP_1 - IRQ __vector_ANALOG_COMP_2 - IRQ __vector_INT0 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_RESERVED15 - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP_A - IRQ __vector_TIMER0_OVF - IRQ __vector_ADC - IRQ __vector_INT1 - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_INT2 - IRQ __vector_WDT - IRQ __vector_EE_READY - IRQ __vector_TIMER0_COMPB - IRQ __vector_INT3 - IRQ __vector_RESERVED30 - IRQ __vector_RESERVED31 - IRQ __vector_SPM_READY diff --git a/device/avr/at90pwm2b.go b/device/avr/at90pwm2b.go index 53175d2..82e19cc 100644 --- a/device/avr/at90pwm2b.go +++ b/device/avr/at90pwm2b.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -58,8 +58,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90pwm2b.ld b/device/avr/at90pwm2b.ld deleted file mode 100644 index 25ab4c9..0000000 --- a/device/avr/at90pwm2b.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90PWM2B.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 32; diff --git a/device/avr/at90pwm2b.s b/device/avr/at90pwm2b.s deleted file mode 100644 index 81913ec..0000000 --- a/device/avr/at90pwm2b.s +++ /dev/null @@ -1,88 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90PWM2B.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_PSC2_CAPT - rjmp __vector_PSC2_EC - rjmp __vector_PSC1_CAPT - rjmp __vector_PSC1_EC - rjmp __vector_PSC0_CAPT - rjmp __vector_PSC0_EC - rjmp __vector_ANALOG_COMP_0 - rjmp __vector_ANALOG_COMP_1 - rjmp __vector_ANALOG_COMP_2 - rjmp __vector_INT0 - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_RESERVED15 - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_OVF - rjmp __vector_ADC - rjmp __vector_INT1 - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_INT2 - rjmp __vector_WDT - rjmp __vector_EE_READY - rjmp __vector_TIMER0_COMPB - rjmp __vector_INT3 - rjmp __vector_RESERVED30 - rjmp __vector_RESERVED31 - rjmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_PSC2_CAPT - IRQ __vector_PSC2_EC - IRQ __vector_PSC1_CAPT - IRQ __vector_PSC1_EC - IRQ __vector_PSC0_CAPT - IRQ __vector_PSC0_EC - IRQ __vector_ANALOG_COMP_0 - IRQ __vector_ANALOG_COMP_1 - IRQ __vector_ANALOG_COMP_2 - IRQ __vector_INT0 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_RESERVED15 - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_OVF - IRQ __vector_ADC - IRQ __vector_INT1 - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_INT2 - IRQ __vector_WDT - IRQ __vector_EE_READY - IRQ __vector_TIMER0_COMPB - IRQ __vector_INT3 - IRQ __vector_RESERVED30 - IRQ __vector_RESERVED31 - IRQ __vector_SPM_READY diff --git a/device/avr/at90pwm316.go b/device/avr/at90pwm316.go index d09539e..e2c8f0b 100644 --- a/device/avr/at90pwm316.go +++ b/device/avr/at90pwm316.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -58,8 +58,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90pwm316.ld b/device/avr/at90pwm316.ld deleted file mode 100644 index 05043de..0000000 --- a/device/avr/at90pwm316.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90PWM316.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 32; diff --git a/device/avr/at90pwm316.s b/device/avr/at90pwm316.s deleted file mode 100644 index aba1a20..0000000 --- a/device/avr/at90pwm316.s +++ /dev/null @@ -1,88 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90PWM316.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_PSC2_CAPT - jmp __vector_PSC2_EC - jmp __vector_PSC1_CAPT - jmp __vector_PSC1_EC - jmp __vector_PSC0_CAPT - jmp __vector_PSC0_EC - jmp __vector_ANALOG_COMP_0 - jmp __vector_ANALOG_COMP_1 - jmp __vector_ANALOG_COMP_2 - jmp __vector_INT0 - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_RESERVED15 - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP_A - jmp __vector_TIMER0_OVF - jmp __vector_ADC - jmp __vector_INT1 - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART_TX - jmp __vector_INT2 - jmp __vector_WDT - jmp __vector_EE_READY - jmp __vector_TIMER0_COMPB - jmp __vector_INT3 - jmp __vector_RESERVED30 - jmp __vector_RESERVED31 - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_PSC2_CAPT - IRQ __vector_PSC2_EC - IRQ __vector_PSC1_CAPT - IRQ __vector_PSC1_EC - IRQ __vector_PSC0_CAPT - IRQ __vector_PSC0_EC - IRQ __vector_ANALOG_COMP_0 - IRQ __vector_ANALOG_COMP_1 - IRQ __vector_ANALOG_COMP_2 - IRQ __vector_INT0 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_RESERVED15 - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP_A - IRQ __vector_TIMER0_OVF - IRQ __vector_ADC - IRQ __vector_INT1 - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_INT2 - IRQ __vector_WDT - IRQ __vector_EE_READY - IRQ __vector_TIMER0_COMPB - IRQ __vector_INT3 - IRQ __vector_RESERVED30 - IRQ __vector_RESERVED31 - IRQ __vector_SPM_READY diff --git a/device/avr/at90pwm3b.go b/device/avr/at90pwm3b.go index a486834..5c9a2ab 100644 --- a/device/avr/at90pwm3b.go +++ b/device/avr/at90pwm3b.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -58,8 +58,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90pwm3b.ld b/device/avr/at90pwm3b.ld deleted file mode 100644 index bc25ceb..0000000 --- a/device/avr/at90pwm3b.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90PWM3B.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 32; diff --git a/device/avr/at90pwm3b.s b/device/avr/at90pwm3b.s deleted file mode 100644 index 8316688..0000000 --- a/device/avr/at90pwm3b.s +++ /dev/null @@ -1,88 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90PWM3B.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_PSC2_CAPT - rjmp __vector_PSC2_EC - rjmp __vector_PSC1_CAPT - rjmp __vector_PSC1_EC - rjmp __vector_PSC0_CAPT - rjmp __vector_PSC0_EC - rjmp __vector_ANALOG_COMP_0 - rjmp __vector_ANALOG_COMP_1 - rjmp __vector_ANALOG_COMP_2 - rjmp __vector_INT0 - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_RESERVED15 - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_OVF - rjmp __vector_ADC - rjmp __vector_INT1 - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_INT2 - rjmp __vector_WDT - rjmp __vector_EE_READY - rjmp __vector_TIMER0_COMPB - rjmp __vector_INT3 - rjmp __vector_RESERVED30 - rjmp __vector_RESERVED31 - rjmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_PSC2_CAPT - IRQ __vector_PSC2_EC - IRQ __vector_PSC1_CAPT - IRQ __vector_PSC1_EC - IRQ __vector_PSC0_CAPT - IRQ __vector_PSC0_EC - IRQ __vector_ANALOG_COMP_0 - IRQ __vector_ANALOG_COMP_1 - IRQ __vector_ANALOG_COMP_2 - IRQ __vector_INT0 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_RESERVED15 - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_OVF - IRQ __vector_ADC - IRQ __vector_INT1 - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_INT2 - IRQ __vector_WDT - IRQ __vector_EE_READY - IRQ __vector_TIMER0_COMPB - IRQ __vector_INT3 - IRQ __vector_RESERVED30 - IRQ __vector_RESERVED31 - IRQ __vector_SPM_READY diff --git a/device/avr/at90pwm81.go b/device/avr/at90pwm81.go index 29c9644..e55dd53 100644 --- a/device/avr/at90pwm81.go +++ b/device/avr/at90pwm81.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -46,8 +46,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90pwm81.ld b/device/avr/at90pwm81.ld deleted file mode 100644 index cc7f17e..0000000 --- a/device/avr/at90pwm81.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90PWM81.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x100; -__num_isrs = 20; diff --git a/device/avr/at90pwm81.s b/device/avr/at90pwm81.s deleted file mode 100644 index bb661e4..0000000 --- a/device/avr/at90pwm81.s +++ /dev/null @@ -1,64 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90PWM81.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_PSC2_CAPT - rjmp __vector_PSC2_EC - rjmp __vector_PSC2_EEC - rjmp __vector_PSC0_CAPT - rjmp __vector_PSC0_EC - rjmp __vector_PSC0_EEC - rjmp __vector_ANALOG_COMP_1 - rjmp __vector_ANALOG_COMP_2 - rjmp __vector_ANALOG_COMP_3 - rjmp __vector_INT0 - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_OVF - rjmp __vector_ADC - rjmp __vector_INT1 - rjmp __vector_SPI_STC - rjmp __vector_INT2 - rjmp __vector_WDT - rjmp __vector_EE_READY - rjmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_PSC2_CAPT - IRQ __vector_PSC2_EC - IRQ __vector_PSC2_EEC - IRQ __vector_PSC0_CAPT - IRQ __vector_PSC0_EC - IRQ __vector_PSC0_EEC - IRQ __vector_ANALOG_COMP_1 - IRQ __vector_ANALOG_COMP_2 - IRQ __vector_ANALOG_COMP_3 - IRQ __vector_INT0 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_OVF - IRQ __vector_ADC - IRQ __vector_INT1 - IRQ __vector_SPI_STC - IRQ __vector_INT2 - IRQ __vector_WDT - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/at90usb1286.go b/device/avr/at90usb1286.go index 65812f6..b4b6f13 100644 --- a/device/avr/at90usb1286.go +++ b/device/avr/at90usb1286.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -64,8 +64,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90usb1286.ld b/device/avr/at90usb1286.ld deleted file mode 100644 index 73a6860..0000000 --- a/device/avr/at90usb1286.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90USB1286.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x20000; -__ram_start = 0x100; -__ram_size = 0x2000; -__num_isrs = 38; diff --git a/device/avr/at90usb1286.s b/device/avr/at90usb1286.s deleted file mode 100644 index b45d629..0000000 --- a/device/avr/at90usb1286.s +++ /dev/null @@ -1,100 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90USB1286.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_USB_GEN - jmp __vector_USB_COM - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_TWI - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_USB_GEN - IRQ __vector_USB_COM - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_TWI - IRQ __vector_SPM_READY diff --git a/device/avr/at90usb1287.go b/device/avr/at90usb1287.go index 0eda142..abd549a 100644 --- a/device/avr/at90usb1287.go +++ b/device/avr/at90usb1287.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -64,8 +64,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90usb1287.ld b/device/avr/at90usb1287.ld deleted file mode 100644 index 3a5a30f..0000000 --- a/device/avr/at90usb1287.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90USB1287.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x20000; -__ram_start = 0x100; -__ram_size = 0x2000; -__num_isrs = 38; diff --git a/device/avr/at90usb1287.s b/device/avr/at90usb1287.s deleted file mode 100644 index 84421b8..0000000 --- a/device/avr/at90usb1287.s +++ /dev/null @@ -1,100 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90USB1287.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_USB_GEN - jmp __vector_USB_COM - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_TWI - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_USB_GEN - IRQ __vector_USB_COM - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_TWI - IRQ __vector_SPM_READY diff --git a/device/avr/at90usb162.go b/device/avr/at90usb162.go index 6156569..92946b2 100644 --- a/device/avr/at90usb162.go +++ b/device/avr/at90usb162.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -55,8 +55,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90usb162.ld b/device/avr/at90usb162.ld deleted file mode 100644 index d38ba1e..0000000 --- a/device/avr/at90usb162.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90USB162.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 29; diff --git a/device/avr/at90usb162.s b/device/avr/at90usb162.s deleted file mode 100644 index d97976b..0000000 --- a/device/avr/at90usb162.s +++ /dev/null @@ -1,82 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90USB162.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_USB_GEN - jmp __vector_USB_COM - jmp __vector_WDT - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_ANALOG_COMP - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_USB_GEN - IRQ __vector_USB_COM - IRQ __vector_WDT - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/at90usb646.go b/device/avr/at90usb646.go index b835741..c8395bb 100644 --- a/device/avr/at90usb646.go +++ b/device/avr/at90usb646.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -64,8 +64,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90usb646.ld b/device/avr/at90usb646.ld deleted file mode 100644 index 62a2bbb..0000000 --- a/device/avr/at90usb646.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90USB646.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 38; diff --git a/device/avr/at90usb646.s b/device/avr/at90usb646.s deleted file mode 100644 index 6a88ec2..0000000 --- a/device/avr/at90usb646.s +++ /dev/null @@ -1,100 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90USB646.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_USB_GEN - jmp __vector_USB_COM - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_TWI - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_USB_GEN - IRQ __vector_USB_COM - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_TWI - IRQ __vector_SPM_READY diff --git a/device/avr/at90usb647.go b/device/avr/at90usb647.go index 0f0d529..98961c3 100644 --- a/device/avr/at90usb647.go +++ b/device/avr/at90usb647.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -64,8 +64,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90usb647.ld b/device/avr/at90usb647.ld deleted file mode 100644 index 3b61b23..0000000 --- a/device/avr/at90usb647.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90USB647.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 38; diff --git a/device/avr/at90usb647.s b/device/avr/at90usb647.s deleted file mode 100644 index 849299a..0000000 --- a/device/avr/at90usb647.s +++ /dev/null @@ -1,100 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90USB647.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_USB_GEN - jmp __vector_USB_COM - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_TWI - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_USB_GEN - IRQ __vector_USB_COM - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_TWI - IRQ __vector_SPM_READY diff --git a/device/avr/at90usb82.go b/device/avr/at90usb82.go index 597fc5b..0ff5510 100644 --- a/device/avr/at90usb82.go +++ b/device/avr/at90usb82.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -55,8 +55,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/at90usb82.ld b/device/avr/at90usb82.ld deleted file mode 100644 index 7ceb5d3..0000000 --- a/device/avr/at90usb82.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from AT90USB82.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 29; diff --git a/device/avr/at90usb82.s b/device/avr/at90usb82.s deleted file mode 100644 index 4383085..0000000 --- a/device/avr/at90usb82.s +++ /dev/null @@ -1,82 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from AT90USB82.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_INT2 - rjmp __vector_INT3 - rjmp __vector_INT4 - rjmp __vector_INT5 - rjmp __vector_INT6 - rjmp __vector_INT7 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_USB_GEN - rjmp __vector_USB_COM - rjmp __vector_WDT - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_COMPC - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART1_RX - rjmp __vector_USART1_UDRE - rjmp __vector_USART1_TX - rjmp __vector_ANALOG_COMP - rjmp __vector_EE_READY - rjmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_USB_GEN - IRQ __vector_USB_COM - IRQ __vector_WDT - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega128.go b/device/avr/atmega128.go index a04e908..b60ad54 100644 --- a/device/avr/atmega128.go +++ b/device/avr/atmega128.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -61,8 +61,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega128.ld b/device/avr/atmega128.ld deleted file mode 100644 index e932107..0000000 --- a/device/avr/atmega128.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega128.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x20000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 35; diff --git a/device/avr/atmega128.s b/device/avr/atmega128.s deleted file mode 100644 index 2b10691..0000000 --- a/device/avr/atmega128.s +++ /dev/null @@ -1,94 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega128.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_ANALOG_COMP - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY diff --git a/device/avr/atmega1280.go b/device/avr/atmega1280.go index ebefc5b..76ee91f 100644 --- a/device/avr/atmega1280.go +++ b/device/avr/atmega1280.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -83,8 +83,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega1280.ld b/device/avr/atmega1280.ld deleted file mode 100644 index afaab3c..0000000 --- a/device/avr/atmega1280.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega1280.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x20000; -__ram_start = 0x200; -__ram_size = 0x2000; -__num_isrs = 57; diff --git a/device/avr/atmega1280.s b/device/avr/atmega1280.s deleted file mode 100644 index e0fa7c5..0000000 --- a/device/avr/atmega1280.s +++ /dev/null @@ -1,138 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega1280.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_TIMER4_CAPT - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_COMPC - jmp __vector_TIMER4_OVF - jmp __vector_TIMER5_CAPT - jmp __vector_TIMER5_COMPA - jmp __vector_TIMER5_COMPB - jmp __vector_TIMER5_COMPC - jmp __vector_TIMER5_OVF - jmp __vector_USART2_RX - jmp __vector_USART2_UDRE - jmp __vector_USART2_TX - jmp __vector_USART3_RX - jmp __vector_USART3_UDRE - jmp __vector_USART3_TX - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_TIMER4_CAPT - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_COMPC - IRQ __vector_TIMER4_OVF - IRQ __vector_TIMER5_CAPT - IRQ __vector_TIMER5_COMPA - IRQ __vector_TIMER5_COMPB - IRQ __vector_TIMER5_COMPC - IRQ __vector_TIMER5_OVF - IRQ __vector_USART2_RX - IRQ __vector_USART2_UDRE - IRQ __vector_USART2_TX - IRQ __vector_USART3_RX - IRQ __vector_USART3_UDRE - IRQ __vector_USART3_TX diff --git a/device/avr/atmega1281.go b/device/avr/atmega1281.go index 2b8609c..6608ad8 100644 --- a/device/avr/atmega1281.go +++ b/device/avr/atmega1281.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -83,8 +83,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega1281.ld b/device/avr/atmega1281.ld deleted file mode 100644 index 5bc8ca3..0000000 --- a/device/avr/atmega1281.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega1281.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x20000; -__ram_start = 0x200; -__ram_size = 0x2000; -__num_isrs = 57; diff --git a/device/avr/atmega1281.s b/device/avr/atmega1281.s deleted file mode 100644 index 03ba121..0000000 --- a/device/avr/atmega1281.s +++ /dev/null @@ -1,138 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega1281.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_TIMER4_CAPT - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_COMPC - jmp __vector_TIMER4_OVF - jmp __vector_TIMER5_CAPT - jmp __vector_TIMER5_COMPA - jmp __vector_TIMER5_COMPB - jmp __vector_TIMER5_COMPC - jmp __vector_TIMER5_OVF - jmp __vector_USART2_RX - jmp __vector_USART2_UDRE - jmp __vector_USART2_TX - jmp __vector_USART3_RX - jmp __vector_USART3_UDRE - jmp __vector_USART3_TX - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_TIMER4_CAPT - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_COMPC - IRQ __vector_TIMER4_OVF - IRQ __vector_TIMER5_CAPT - IRQ __vector_TIMER5_COMPA - IRQ __vector_TIMER5_COMPB - IRQ __vector_TIMER5_COMPC - IRQ __vector_TIMER5_OVF - IRQ __vector_USART2_RX - IRQ __vector_USART2_UDRE - IRQ __vector_USART2_TX - IRQ __vector_USART3_RX - IRQ __vector_USART3_UDRE - IRQ __vector_USART3_TX diff --git a/device/avr/atmega1284.go b/device/avr/atmega1284.go index 644f651..da2403d 100644 --- a/device/avr/atmega1284.go +++ b/device/avr/atmega1284.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -61,8 +61,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega1284.ld b/device/avr/atmega1284.ld deleted file mode 100644 index b1bdee5..0000000 --- a/device/avr/atmega1284.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega1284.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x20000; -__ram_start = 0x100; -__ram_size = 0x4000; -__num_isrs = 35; diff --git a/device/avr/atmega1284.s b/device/avr/atmega1284.s deleted file mode 100644 index 2f6d746..0000000 --- a/device/avr/atmega1284.s +++ /dev/null @@ -1,94 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega1284.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_OVF diff --git a/device/avr/atmega1284p.go b/device/avr/atmega1284p.go index fd7ad87..61310b9 100644 --- a/device/avr/atmega1284p.go +++ b/device/avr/atmega1284p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -61,8 +61,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega1284p.ld b/device/avr/atmega1284p.ld deleted file mode 100644 index 8fae3fe..0000000 --- a/device/avr/atmega1284p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega1284P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x20000; -__ram_start = 0x100; -__ram_size = 0x4000; -__num_isrs = 35; diff --git a/device/avr/atmega1284p.s b/device/avr/atmega1284p.s deleted file mode 100644 index 435a153..0000000 --- a/device/avr/atmega1284p.s +++ /dev/null @@ -1,94 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega1284P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_OVF diff --git a/device/avr/atmega1284rfr2.go b/device/avr/atmega1284rfr2.go index 22b18b8..84a0543 100644 --- a/device/avr/atmega1284rfr2.go +++ b/device/avr/atmega1284rfr2.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega1284rfr2.ld b/device/avr/atmega1284rfr2.ld deleted file mode 100644 index 6570c06..0000000 --- a/device/avr/atmega1284rfr2.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega1284RFR2.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x20000; -__ram_start = 0x200; -__ram_size = 0x4000; -__num_isrs = 71; diff --git a/device/avr/atmega1284rfr2.s b/device/avr/atmega1284rfr2.s deleted file mode 100644 index fbadaa2..0000000 --- a/device/avr/atmega1284rfr2.s +++ /dev/null @@ -1,172 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega1284RFR2.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_TIMER4_CAPT - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_COMPC - jmp __vector_TIMER4_OVF - jmp __vector_TIMER5_CAPT - jmp __vector_TIMER5_COMPA - jmp __vector_TIMER5_COMPB - jmp __vector_TIMER5_COMPC - jmp __vector_TIMER5_OVF - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_TRX24_PLL_LOCK - jmp __vector_TRX24_PLL_UNLOCK - jmp __vector_TRX24_RX_START - jmp __vector_TRX24_RX_END - jmp __vector_TRX24_CCA_ED_DONE - jmp __vector_TRX24_XAH_AMI - jmp __vector_TRX24_TX_END - jmp __vector_TRX24_AWAKE - jmp __vector_SCNT_CMP1 - jmp __vector_SCNT_CMP2 - jmp __vector_SCNT_CMP3 - jmp __vector_SCNT_OVFL - jmp __vector_SCNT_BACKOFF - jmp __vector_AES_READY - jmp __vector_BAT_LOW - jmp __vector_TRX24_TX_START - jmp __vector_TRX24_AMI0 - jmp __vector_TRX24_AMI1 - jmp __vector_TRX24_AMI2 - jmp __vector_TRX24_AMI3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_TIMER4_CAPT - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_COMPC - IRQ __vector_TIMER4_OVF - IRQ __vector_TIMER5_CAPT - IRQ __vector_TIMER5_COMPA - IRQ __vector_TIMER5_COMPB - IRQ __vector_TIMER5_COMPC - IRQ __vector_TIMER5_OVF - IRQ __vector_TRX24_PLL_LOCK - IRQ __vector_TRX24_PLL_UNLOCK - IRQ __vector_TRX24_RX_START - IRQ __vector_TRX24_RX_END - IRQ __vector_TRX24_CCA_ED_DONE - IRQ __vector_TRX24_XAH_AMI - IRQ __vector_TRX24_TX_END - IRQ __vector_TRX24_AWAKE - IRQ __vector_SCNT_CMP1 - IRQ __vector_SCNT_CMP2 - IRQ __vector_SCNT_CMP3 - IRQ __vector_SCNT_OVFL - IRQ __vector_SCNT_BACKOFF - IRQ __vector_AES_READY - IRQ __vector_BAT_LOW - IRQ __vector_TRX24_TX_START - IRQ __vector_TRX24_AMI0 - IRQ __vector_TRX24_AMI1 - IRQ __vector_TRX24_AMI2 - IRQ __vector_TRX24_AMI3 diff --git a/device/avr/atmega128a.go b/device/avr/atmega128a.go index 5e6ad85..6c880d7 100644 --- a/device/avr/atmega128a.go +++ b/device/avr/atmega128a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -61,8 +61,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega128a.ld b/device/avr/atmega128a.ld deleted file mode 100644 index 019cdd8..0000000 --- a/device/avr/atmega128a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega128A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x20000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 35; diff --git a/device/avr/atmega128a.s b/device/avr/atmega128a.s deleted file mode 100644 index 41aea72..0000000 --- a/device/avr/atmega128a.s +++ /dev/null @@ -1,94 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega128A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_ANALOG_COMP - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY diff --git a/device/avr/atmega128rfa1.go b/device/avr/atmega128rfa1.go index 4b7407b..9b601ca 100644 --- a/device/avr/atmega128rfa1.go +++ b/device/avr/atmega128rfa1.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -98,8 +98,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega128rfa1.ld b/device/avr/atmega128rfa1.ld deleted file mode 100644 index 1cca095..0000000 --- a/device/avr/atmega128rfa1.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega128RFA1.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x20000; -__ram_start = 0x200; -__ram_size = 0x4000; -__num_isrs = 72; diff --git a/device/avr/atmega128rfa1.s b/device/avr/atmega128rfa1.s deleted file mode 100644 index 26f5762..0000000 --- a/device/avr/atmega128rfa1.s +++ /dev/null @@ -1,168 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega128RFA1.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_TIMER4_CAPT - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_COMPC - jmp __vector_TIMER4_OVF - jmp __vector_TIMER5_CAPT - jmp __vector_TIMER5_COMPA - jmp __vector_TIMER5_COMPB - jmp __vector_TIMER5_COMPC - jmp __vector_TIMER5_OVF - jmp __vector_USART2_RX - jmp __vector_USART2_UDRE - jmp __vector_USART2_TX - jmp __vector_USART3_RX - jmp __vector_USART3_UDRE - jmp __vector_USART3_TX - jmp __vector_TRX24_PLL_LOCK - jmp __vector_TRX24_PLL_UNLOCK - jmp __vector_TRX24_RX_START - jmp __vector_TRX24_RX_END - jmp __vector_TRX24_CCA_ED_DONE - jmp __vector_TRX24_XAH_AMI - jmp __vector_TRX24_TX_END - jmp __vector_TRX24_AWAKE - jmp __vector_SCNT_CMP1 - jmp __vector_SCNT_CMP2 - jmp __vector_SCNT_CMP3 - jmp __vector_SCNT_OVFL - jmp __vector_SCNT_BACKOFF - jmp __vector_AES_READY - jmp __vector_BAT_LOW - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_TIMER4_CAPT - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_COMPC - IRQ __vector_TIMER4_OVF - IRQ __vector_TIMER5_CAPT - IRQ __vector_TIMER5_COMPA - IRQ __vector_TIMER5_COMPB - IRQ __vector_TIMER5_COMPC - IRQ __vector_TIMER5_OVF - IRQ __vector_USART2_RX - IRQ __vector_USART2_UDRE - IRQ __vector_USART2_TX - IRQ __vector_USART3_RX - IRQ __vector_USART3_UDRE - IRQ __vector_USART3_TX - IRQ __vector_TRX24_PLL_LOCK - IRQ __vector_TRX24_PLL_UNLOCK - IRQ __vector_TRX24_RX_START - IRQ __vector_TRX24_RX_END - IRQ __vector_TRX24_CCA_ED_DONE - IRQ __vector_TRX24_XAH_AMI - IRQ __vector_TRX24_TX_END - IRQ __vector_TRX24_AWAKE - IRQ __vector_SCNT_CMP1 - IRQ __vector_SCNT_CMP2 - IRQ __vector_SCNT_CMP3 - IRQ __vector_SCNT_OVFL - IRQ __vector_SCNT_BACKOFF - IRQ __vector_AES_READY - IRQ __vector_BAT_LOW diff --git a/device/avr/atmega128rfr2.go b/device/avr/atmega128rfr2.go index dc7f07e..d56d673 100644 --- a/device/avr/atmega128rfr2.go +++ b/device/avr/atmega128rfr2.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega128rfr2.ld b/device/avr/atmega128rfr2.ld deleted file mode 100644 index 5812f3e..0000000 --- a/device/avr/atmega128rfr2.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega128RFR2.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x20000; -__ram_start = 0x200; -__ram_size = 0x4000; -__num_isrs = 71; diff --git a/device/avr/atmega128rfr2.s b/device/avr/atmega128rfr2.s deleted file mode 100644 index f67bcd2..0000000 --- a/device/avr/atmega128rfr2.s +++ /dev/null @@ -1,172 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega128RFR2.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_TIMER4_CAPT - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_COMPC - jmp __vector_TIMER4_OVF - jmp __vector_TIMER5_CAPT - jmp __vector_TIMER5_COMPA - jmp __vector_TIMER5_COMPB - jmp __vector_TIMER5_COMPC - jmp __vector_TIMER5_OVF - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_TRX24_PLL_LOCK - jmp __vector_TRX24_PLL_UNLOCK - jmp __vector_TRX24_RX_START - jmp __vector_TRX24_RX_END - jmp __vector_TRX24_CCA_ED_DONE - jmp __vector_TRX24_XAH_AMI - jmp __vector_TRX24_TX_END - jmp __vector_TRX24_AWAKE - jmp __vector_SCNT_CMP1 - jmp __vector_SCNT_CMP2 - jmp __vector_SCNT_CMP3 - jmp __vector_SCNT_OVFL - jmp __vector_SCNT_BACKOFF - jmp __vector_AES_READY - jmp __vector_BAT_LOW - jmp __vector_TRX24_TX_START - jmp __vector_TRX24_AMI0 - jmp __vector_TRX24_AMI1 - jmp __vector_TRX24_AMI2 - jmp __vector_TRX24_AMI3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_TIMER4_CAPT - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_COMPC - IRQ __vector_TIMER4_OVF - IRQ __vector_TIMER5_CAPT - IRQ __vector_TIMER5_COMPA - IRQ __vector_TIMER5_COMPB - IRQ __vector_TIMER5_COMPC - IRQ __vector_TIMER5_OVF - IRQ __vector_TRX24_PLL_LOCK - IRQ __vector_TRX24_PLL_UNLOCK - IRQ __vector_TRX24_RX_START - IRQ __vector_TRX24_RX_END - IRQ __vector_TRX24_CCA_ED_DONE - IRQ __vector_TRX24_XAH_AMI - IRQ __vector_TRX24_TX_END - IRQ __vector_TRX24_AWAKE - IRQ __vector_SCNT_CMP1 - IRQ __vector_SCNT_CMP2 - IRQ __vector_SCNT_CMP3 - IRQ __vector_SCNT_OVFL - IRQ __vector_SCNT_BACKOFF - IRQ __vector_AES_READY - IRQ __vector_BAT_LOW - IRQ __vector_TRX24_TX_START - IRQ __vector_TRX24_AMI0 - IRQ __vector_TRX24_AMI1 - IRQ __vector_TRX24_AMI2 - IRQ __vector_TRX24_AMI3 diff --git a/device/avr/atmega16.go b/device/avr/atmega16.go index 3f29124..fef2d06 100644 --- a/device/avr/atmega16.go +++ b/device/avr/atmega16.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -47,8 +47,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega16.ld b/device/avr/atmega16.ld deleted file mode 100644 index 4f8bf35..0000000 --- a/device/avr/atmega16.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega16.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x60; -__ram_size = 0x400; -__num_isrs = 21; diff --git a/device/avr/atmega16.s b/device/avr/atmega16.s deleted file mode 100644 index eff12c2..0000000 --- a/device/avr/atmega16.s +++ /dev/null @@ -1,66 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega16.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RXC - jmp __vector_USART_UDRE - jmp __vector_USART_TXC - jmp __vector_ADC - jmp __vector_EE_RDY - jmp __vector_ANA_COMP - jmp __vector_TWI - jmp __vector_INT2 - jmp __vector_TIMER0_COMP - jmp __vector_SPM_RDY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RXC - IRQ __vector_USART_UDRE - IRQ __vector_USART_TXC - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_TWI - IRQ __vector_INT2 - IRQ __vector_TIMER0_COMP - IRQ __vector_SPM_RDY diff --git a/device/avr/atmega162.go b/device/avr/atmega162.go index 20f1b57..7318f40 100644 --- a/device/avr/atmega162.go +++ b/device/avr/atmega162.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -54,8 +54,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega162.ld b/device/avr/atmega162.ld deleted file mode 100644 index fe3ec3c..0000000 --- a/device/avr/atmega162.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega162.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 28; diff --git a/device/avr/atmega162.s b/device/avr/atmega162.s deleted file mode 100644 index a2c99b1..0000000 --- a/device/avr/atmega162.s +++ /dev/null @@ -1,80 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega162.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_OVF - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RXC - jmp __vector_USART1_RXC - jmp __vector_USART0_UDRE - jmp __vector_USART1_UDRE - jmp __vector_USART0_TXC - jmp __vector_USART1_TXC - jmp __vector_EE_RDY - jmp __vector_ANA_COMP - jmp __vector_SPM_RDY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_OVF - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RXC - IRQ __vector_USART1_RXC - IRQ __vector_USART0_UDRE - IRQ __vector_USART1_UDRE - IRQ __vector_USART0_TXC - IRQ __vector_USART1_TXC - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_SPM_RDY diff --git a/device/avr/atmega164a.go b/device/avr/atmega164a.go index 7979881..c33a8d8 100644 --- a/device/avr/atmega164a.go +++ b/device/avr/atmega164a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega164a.ld b/device/avr/atmega164a.ld deleted file mode 100644 index a503d39..0000000 --- a/device/avr/atmega164a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega164A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 31; diff --git a/device/avr/atmega164a.s b/device/avr/atmega164a.s deleted file mode 100644 index db92004..0000000 --- a/device/avr/atmega164a.s +++ /dev/null @@ -1,86 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega164A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX diff --git a/device/avr/atmega164p.go b/device/avr/atmega164p.go index b48e29d..3255d59 100644 --- a/device/avr/atmega164p.go +++ b/device/avr/atmega164p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega164p.ld b/device/avr/atmega164p.ld deleted file mode 100644 index a1c74cc..0000000 --- a/device/avr/atmega164p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega164P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 31; diff --git a/device/avr/atmega164p.s b/device/avr/atmega164p.s deleted file mode 100644 index 938c7db..0000000 --- a/device/avr/atmega164p.s +++ /dev/null @@ -1,86 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega164P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX diff --git a/device/avr/atmega164pa.go b/device/avr/atmega164pa.go index 2e2165d..0fb1e81 100644 --- a/device/avr/atmega164pa.go +++ b/device/avr/atmega164pa.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega164pa.ld b/device/avr/atmega164pa.ld deleted file mode 100644 index 25d31a8..0000000 --- a/device/avr/atmega164pa.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega164PA.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 31; diff --git a/device/avr/atmega164pa.s b/device/avr/atmega164pa.s deleted file mode 100644 index b581256..0000000 --- a/device/avr/atmega164pa.s +++ /dev/null @@ -1,86 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega164PA.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX diff --git a/device/avr/atmega165a.go b/device/avr/atmega165a.go index 13517b6..5aefd31 100644 --- a/device/avr/atmega165a.go +++ b/device/avr/atmega165a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -48,8 +48,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega165a.ld b/device/avr/atmega165a.ld deleted file mode 100644 index 39c8d6a..0000000 --- a/device/avr/atmega165a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega165A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 22; diff --git a/device/avr/atmega165a.s b/device/avr/atmega165a.s deleted file mode 100644 index c8919ea..0000000 --- a/device/avr/atmega165a.s +++ /dev/null @@ -1,68 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega165A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega165p.go b/device/avr/atmega165p.go index 6bda957..abe44c6 100644 --- a/device/avr/atmega165p.go +++ b/device/avr/atmega165p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -48,8 +48,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega165p.ld b/device/avr/atmega165p.ld deleted file mode 100644 index 0520535..0000000 --- a/device/avr/atmega165p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega165P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 22; diff --git a/device/avr/atmega165p.s b/device/avr/atmega165p.s deleted file mode 100644 index f16c572..0000000 --- a/device/avr/atmega165p.s +++ /dev/null @@ -1,68 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega165P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega165pa.go b/device/avr/atmega165pa.go index cc15549..7bd4a8c 100644 --- a/device/avr/atmega165pa.go +++ b/device/avr/atmega165pa.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -48,8 +48,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega165pa.ld b/device/avr/atmega165pa.ld deleted file mode 100644 index 13fa87b..0000000 --- a/device/avr/atmega165pa.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega165PA.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 22; diff --git a/device/avr/atmega165pa.s b/device/avr/atmega165pa.s deleted file mode 100644 index 8e7d0dd..0000000 --- a/device/avr/atmega165pa.s +++ /dev/null @@ -1,68 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega165PA.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega168.go b/device/avr/atmega168.go index b947aa1..ba8bec5 100644 --- a/device/avr/atmega168.go +++ b/device/avr/atmega168.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega168.ld b/device/avr/atmega168.ld deleted file mode 100644 index c585cef..0000000 --- a/device/avr/atmega168.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega168.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 26; diff --git a/device/avr/atmega168.s b/device/avr/atmega168.s deleted file mode 100644 index 423ecc1..0000000 --- a/device/avr/atmega168.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega168.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART_TX - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_ANALOG_COMP - jmp __vector_TWI - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_READY diff --git a/device/avr/atmega168a.go b/device/avr/atmega168a.go index 65bd0ed..aaff525 100644 --- a/device/avr/atmega168a.go +++ b/device/avr/atmega168a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega168a.ld b/device/avr/atmega168a.ld deleted file mode 100644 index b3c9383..0000000 --- a/device/avr/atmega168a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega168A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 26; diff --git a/device/avr/atmega168a.s b/device/avr/atmega168a.s deleted file mode 100644 index 23a43bc..0000000 --- a/device/avr/atmega168a.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega168A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART_TX - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_ANALOG_COMP - jmp __vector_TWI - jmp __vector_SPM_Ready - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready diff --git a/device/avr/atmega168p.go b/device/avr/atmega168p.go index ffeced0..a1472c7 100644 --- a/device/avr/atmega168p.go +++ b/device/avr/atmega168p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega168p.ld b/device/avr/atmega168p.ld deleted file mode 100644 index 9c4501a..0000000 --- a/device/avr/atmega168p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega168P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 26; diff --git a/device/avr/atmega168p.s b/device/avr/atmega168p.s deleted file mode 100644 index 06c332c..0000000 --- a/device/avr/atmega168p.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega168P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART_TX - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_ANALOG_COMP - jmp __vector_TWI - jmp __vector_SPM_Ready - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready diff --git a/device/avr/atmega168pa.go b/device/avr/atmega168pa.go index f1a4ed6..e0a323f 100644 --- a/device/avr/atmega168pa.go +++ b/device/avr/atmega168pa.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega168pa.ld b/device/avr/atmega168pa.ld deleted file mode 100644 index 23eb5b5..0000000 --- a/device/avr/atmega168pa.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega168PA.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 26; diff --git a/device/avr/atmega168pa.s b/device/avr/atmega168pa.s deleted file mode 100644 index d59f209..0000000 --- a/device/avr/atmega168pa.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega168PA.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART_TX - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_ANALOG_COMP - jmp __vector_TWI - jmp __vector_SPM_Ready - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready diff --git a/device/avr/atmega168pb.go b/device/avr/atmega168pb.go index f771086..ba7e19d 100644 --- a/device/avr/atmega168pb.go +++ b/device/avr/atmega168pb.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -53,8 +53,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega168pb.ld b/device/avr/atmega168pb.ld deleted file mode 100644 index a94f8fc..0000000 --- a/device/avr/atmega168pb.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega168PB.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 27; diff --git a/device/avr/atmega168pb.s b/device/avr/atmega168pb.s deleted file mode 100644 index f34b015..0000000 --- a/device/avr/atmega168pb.s +++ /dev/null @@ -1,78 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega168PB.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART_TX - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_ANALOG_COMP - jmp __vector_TWI - jmp __vector_SPM_Ready - jmp __vector_USART_START - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready - IRQ __vector_USART_START diff --git a/device/avr/atmega169a.go b/device/avr/atmega169a.go index 2cceaa1..2213760 100644 --- a/device/avr/atmega169a.go +++ b/device/avr/atmega169a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -49,8 +49,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega169a.ld b/device/avr/atmega169a.ld deleted file mode 100644 index d2ed050..0000000 --- a/device/avr/atmega169a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega169A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 23; diff --git a/device/avr/atmega169a.s b/device/avr/atmega169a.s deleted file mode 100644 index 65bdfac..0000000 --- a/device/avr/atmega169a.s +++ /dev/null @@ -1,70 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega169A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD diff --git a/device/avr/atmega169p.go b/device/avr/atmega169p.go index 6e7a441..4f8ef0d 100644 --- a/device/avr/atmega169p.go +++ b/device/avr/atmega169p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -49,8 +49,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega169p.ld b/device/avr/atmega169p.ld deleted file mode 100644 index de4b8d7..0000000 --- a/device/avr/atmega169p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega169P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 23; diff --git a/device/avr/atmega169p.s b/device/avr/atmega169p.s deleted file mode 100644 index 52ca3b9..0000000 --- a/device/avr/atmega169p.s +++ /dev/null @@ -1,70 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega169P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD diff --git a/device/avr/atmega169pa.go b/device/avr/atmega169pa.go index f2c40af..da5bea1 100644 --- a/device/avr/atmega169pa.go +++ b/device/avr/atmega169pa.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -49,8 +49,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega169pa.ld b/device/avr/atmega169pa.ld deleted file mode 100644 index 01da35b..0000000 --- a/device/avr/atmega169pa.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega169PA.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 23; diff --git a/device/avr/atmega169pa.s b/device/avr/atmega169pa.s deleted file mode 100644 index 2a7dc95..0000000 --- a/device/avr/atmega169pa.s +++ /dev/null @@ -1,70 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega169PA.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD diff --git a/device/avr/atmega16a.go b/device/avr/atmega16a.go index 6882507..f3bbd2f 100644 --- a/device/avr/atmega16a.go +++ b/device/avr/atmega16a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -47,8 +47,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega16a.ld b/device/avr/atmega16a.ld deleted file mode 100644 index e66cc7d..0000000 --- a/device/avr/atmega16a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega16A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x60; -__ram_size = 0x400; -__num_isrs = 21; diff --git a/device/avr/atmega16a.s b/device/avr/atmega16a.s deleted file mode 100644 index affc7d9..0000000 --- a/device/avr/atmega16a.s +++ /dev/null @@ -1,66 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega16A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RXC - jmp __vector_USART_UDRE - jmp __vector_USART_TXC - jmp __vector_ADC - jmp __vector_EE_RDY - jmp __vector_ANA_COMP - jmp __vector_TWI - jmp __vector_INT2 - jmp __vector_TIMER0_COMP - jmp __vector_SPM_RDY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RXC - IRQ __vector_USART_UDRE - IRQ __vector_USART_TXC - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_TWI - IRQ __vector_INT2 - IRQ __vector_TIMER0_COMP - IRQ __vector_SPM_RDY diff --git a/device/avr/atmega16hva.go b/device/avr/atmega16hva.go index 0a9ec28..bf76015 100644 --- a/device/avr/atmega16hva.go +++ b/device/avr/atmega16hva.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -47,8 +47,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega16hva.ld b/device/avr/atmega16hva.ld deleted file mode 100644 index fee9e99..0000000 --- a/device/avr/atmega16hva.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega16HVA.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 21; diff --git a/device/avr/atmega16hva.s b/device/avr/atmega16hva.s deleted file mode 100644 index 4915439..0000000 --- a/device/avr/atmega16hva.s +++ /dev/null @@ -1,66 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega16HVA.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_BPINT - jmp __vector_VREGMON - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_WDT - jmp __vector_TIMER1_IC - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_IC - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_VADC - jmp __vector_CCADC_CONV - jmp __vector_CCADC_REG_CUR - jmp __vector_CCADC_ACC - jmp __vector_EE_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_BPINT - IRQ __vector_VREGMON - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_WDT - IRQ __vector_TIMER1_IC - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_IC - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_VADC - IRQ __vector_CCADC_CONV - IRQ __vector_CCADC_REG_CUR - IRQ __vector_CCADC_ACC - IRQ __vector_EE_READY diff --git a/device/avr/atmega16hvb.go b/device/avr/atmega16hvb.go index ec81ef5..79a48e5 100644 --- a/device/avr/atmega16hvb.go +++ b/device/avr/atmega16hvb.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -55,8 +55,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega16hvb.ld b/device/avr/atmega16hvb.ld deleted file mode 100644 index 9239f47..0000000 --- a/device/avr/atmega16hvb.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega16HVB.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 29; diff --git a/device/avr/atmega16hvb.s b/device/avr/atmega16hvb.s deleted file mode 100644 index da71319..0000000 --- a/device/avr/atmega16hvb.s +++ /dev/null @@ -1,82 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega16HVB.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_BPINT - jmp __vector_VREGMON - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_WDT - jmp __vector_BGSCD - jmp __vector_CHDET - jmp __vector_TIMER1_IC - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_IC - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_TWIBUSCD - jmp __vector_TWI - jmp __vector_SPI_STC - jmp __vector_VADC - jmp __vector_CCADC_CONV - jmp __vector_CCADC_REG_CUR - jmp __vector_CCADC_ACC - jmp __vector_EE_READY - jmp __vector_SPM - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_BPINT - IRQ __vector_VREGMON - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_BGSCD - IRQ __vector_CHDET - IRQ __vector_TIMER1_IC - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_IC - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_TWIBUSCD - IRQ __vector_TWI - IRQ __vector_SPI_STC - IRQ __vector_VADC - IRQ __vector_CCADC_CONV - IRQ __vector_CCADC_REG_CUR - IRQ __vector_CCADC_ACC - IRQ __vector_EE_READY - IRQ __vector_SPM diff --git a/device/avr/atmega16hvbrevb.go b/device/avr/atmega16hvbrevb.go index f2b6919..435423c 100644 --- a/device/avr/atmega16hvbrevb.go +++ b/device/avr/atmega16hvbrevb.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -55,8 +55,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega16hvbrevb.ld b/device/avr/atmega16hvbrevb.ld deleted file mode 100644 index 963f2a1..0000000 --- a/device/avr/atmega16hvbrevb.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega16HVBrevB.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 29; diff --git a/device/avr/atmega16hvbrevb.s b/device/avr/atmega16hvbrevb.s deleted file mode 100644 index f4c7226..0000000 --- a/device/avr/atmega16hvbrevb.s +++ /dev/null @@ -1,82 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega16HVBrevB.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_BPINT - jmp __vector_VREGMON - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_WDT - jmp __vector_BGSCD - jmp __vector_CHDET - jmp __vector_TIMER1_IC - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_IC - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_TWIBUSCD - jmp __vector_TWI - jmp __vector_SPI_STC - jmp __vector_VADC - jmp __vector_CCADC_CONV - jmp __vector_CCADC_REG_CUR - jmp __vector_CCADC_ACC - jmp __vector_EE_READY - jmp __vector_SPM - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_BPINT - IRQ __vector_VREGMON - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_BGSCD - IRQ __vector_CHDET - IRQ __vector_TIMER1_IC - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_IC - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_TWIBUSCD - IRQ __vector_TWI - IRQ __vector_SPI_STC - IRQ __vector_VADC - IRQ __vector_CCADC_CONV - IRQ __vector_CCADC_REG_CUR - IRQ __vector_CCADC_ACC - IRQ __vector_EE_READY - IRQ __vector_SPM diff --git a/device/avr/atmega16m1.go b/device/avr/atmega16m1.go index a4e008c..95a1e69 100644 --- a/device/avr/atmega16m1.go +++ b/device/avr/atmega16m1.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega16m1.ld b/device/avr/atmega16m1.ld deleted file mode 100644 index 057ba4d..0000000 --- a/device/avr/atmega16m1.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega16M1.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 31; diff --git a/device/avr/atmega16m1.s b/device/avr/atmega16m1.s deleted file mode 100644 index 3d71a44..0000000 --- a/device/avr/atmega16m1.s +++ /dev/null @@ -1,86 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega16M1.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_ANACOMP0 - jmp __vector_ANACOMP1 - jmp __vector_ANACOMP2 - jmp __vector_ANACOMP3 - jmp __vector_PSC_FAULT - jmp __vector_PSC_EC - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_CAN_INT - jmp __vector_CAN_TOVF - jmp __vector_LIN_TC - jmp __vector_LIN_ERR - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_SPI_STC - jmp __vector_ADC - jmp __vector_WDT - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_ANACOMP0 - IRQ __vector_ANACOMP1 - IRQ __vector_ANACOMP2 - IRQ __vector_ANACOMP3 - IRQ __vector_PSC_FAULT - IRQ __vector_PSC_EC - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_CAN_INT - IRQ __vector_CAN_TOVF - IRQ __vector_LIN_TC - IRQ __vector_LIN_ERR - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_SPI_STC - IRQ __vector_ADC - IRQ __vector_WDT - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega16u2.go b/device/avr/atmega16u2.go index ca97233..076a73d 100644 --- a/device/avr/atmega16u2.go +++ b/device/avr/atmega16u2.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -55,8 +55,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega16u2.ld b/device/avr/atmega16u2.ld deleted file mode 100644 index 89db6f8..0000000 --- a/device/avr/atmega16u2.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega16U2.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 29; diff --git a/device/avr/atmega16u2.s b/device/avr/atmega16u2.s deleted file mode 100644 index 5a3870c..0000000 --- a/device/avr/atmega16u2.s +++ /dev/null @@ -1,82 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega16U2.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_USB_GEN - jmp __vector_USB_COM - jmp __vector_WDT - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_ANALOG_COMP - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_USB_GEN - IRQ __vector_USB_COM - IRQ __vector_WDT - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega16u4.go b/device/avr/atmega16u4.go index 7fddc99..a85156c 100644 --- a/device/avr/atmega16u4.go +++ b/device/avr/atmega16u4.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -69,8 +69,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega16u4.ld b/device/avr/atmega16u4.ld deleted file mode 100644 index fcf340e..0000000 --- a/device/avr/atmega16u4.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega16U4.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x500; -__num_isrs = 43; diff --git a/device/avr/atmega16u4.s b/device/avr/atmega16u4.s deleted file mode 100644 index 97ef195..0000000 --- a/device/avr/atmega16u4.s +++ /dev/null @@ -1,110 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega16U4.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_Reserved1 - jmp __vector_Reserved2 - jmp __vector_INT6 - jmp __vector_Reserved3 - jmp __vector_PCINT0 - jmp __vector_USB_GEN - jmp __vector_USB_COM - jmp __vector_WDT - jmp __vector_Reserved4 - jmp __vector_Reserved5 - jmp __vector_Reserved6 - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_COMPD - jmp __vector_TIMER4_OVF - jmp __vector_TIMER4_FPF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_Reserved1 - IRQ __vector_Reserved2 - IRQ __vector_INT6 - IRQ __vector_Reserved3 - IRQ __vector_PCINT0 - IRQ __vector_USB_GEN - IRQ __vector_USB_COM - IRQ __vector_WDT - IRQ __vector_Reserved4 - IRQ __vector_Reserved5 - IRQ __vector_Reserved6 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_COMPD - IRQ __vector_TIMER4_OVF - IRQ __vector_TIMER4_FPF diff --git a/device/avr/atmega2560.go b/device/avr/atmega2560.go index 5e666a3..48d979f 100644 --- a/device/avr/atmega2560.go +++ b/device/avr/atmega2560.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -83,8 +83,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega2560.ld b/device/avr/atmega2560.ld deleted file mode 100644 index 3c596ac..0000000 --- a/device/avr/atmega2560.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega2560.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x40000; -__ram_start = 0x200; -__ram_size = 0x2000; -__num_isrs = 57; diff --git a/device/avr/atmega2560.s b/device/avr/atmega2560.s deleted file mode 100644 index ff7e435..0000000 --- a/device/avr/atmega2560.s +++ /dev/null @@ -1,138 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega2560.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_TIMER4_CAPT - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_COMPC - jmp __vector_TIMER4_OVF - jmp __vector_TIMER5_CAPT - jmp __vector_TIMER5_COMPA - jmp __vector_TIMER5_COMPB - jmp __vector_TIMER5_COMPC - jmp __vector_TIMER5_OVF - jmp __vector_USART2_RX - jmp __vector_USART2_UDRE - jmp __vector_USART2_TX - jmp __vector_USART3_RX - jmp __vector_USART3_UDRE - jmp __vector_USART3_TX - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_TIMER4_CAPT - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_COMPC - IRQ __vector_TIMER4_OVF - IRQ __vector_TIMER5_CAPT - IRQ __vector_TIMER5_COMPA - IRQ __vector_TIMER5_COMPB - IRQ __vector_TIMER5_COMPC - IRQ __vector_TIMER5_OVF - IRQ __vector_USART2_RX - IRQ __vector_USART2_UDRE - IRQ __vector_USART2_TX - IRQ __vector_USART3_RX - IRQ __vector_USART3_UDRE - IRQ __vector_USART3_TX diff --git a/device/avr/atmega2561.go b/device/avr/atmega2561.go index 566b33b..f761180 100644 --- a/device/avr/atmega2561.go +++ b/device/avr/atmega2561.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -83,8 +83,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega2561.ld b/device/avr/atmega2561.ld deleted file mode 100644 index e8c87dc..0000000 --- a/device/avr/atmega2561.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega2561.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x40000; -__ram_start = 0x200; -__ram_size = 0x2000; -__num_isrs = 57; diff --git a/device/avr/atmega2561.s b/device/avr/atmega2561.s deleted file mode 100644 index 1c57649..0000000 --- a/device/avr/atmega2561.s +++ /dev/null @@ -1,138 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega2561.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_TIMER4_CAPT - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_COMPC - jmp __vector_TIMER4_OVF - jmp __vector_TIMER5_CAPT - jmp __vector_TIMER5_COMPA - jmp __vector_TIMER5_COMPB - jmp __vector_TIMER5_COMPC - jmp __vector_TIMER5_OVF - jmp __vector_USART2_RX - jmp __vector_USART2_UDRE - jmp __vector_USART2_TX - jmp __vector_USART3_RX - jmp __vector_USART3_UDRE - jmp __vector_USART3_TX - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_TIMER4_CAPT - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_COMPC - IRQ __vector_TIMER4_OVF - IRQ __vector_TIMER5_CAPT - IRQ __vector_TIMER5_COMPA - IRQ __vector_TIMER5_COMPB - IRQ __vector_TIMER5_COMPC - IRQ __vector_TIMER5_OVF - IRQ __vector_USART2_RX - IRQ __vector_USART2_UDRE - IRQ __vector_USART2_TX - IRQ __vector_USART3_RX - IRQ __vector_USART3_UDRE - IRQ __vector_USART3_TX diff --git a/device/avr/atmega2564rfr2.go b/device/avr/atmega2564rfr2.go index 20d7f93..9c88193 100644 --- a/device/avr/atmega2564rfr2.go +++ b/device/avr/atmega2564rfr2.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega2564rfr2.ld b/device/avr/atmega2564rfr2.ld deleted file mode 100644 index b12672e..0000000 --- a/device/avr/atmega2564rfr2.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega2564RFR2.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x40000; -__ram_start = 0x200; -__ram_size = 0x8000; -__num_isrs = 71; diff --git a/device/avr/atmega2564rfr2.s b/device/avr/atmega2564rfr2.s deleted file mode 100644 index 166fbc4..0000000 --- a/device/avr/atmega2564rfr2.s +++ /dev/null @@ -1,172 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega2564RFR2.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_TIMER4_CAPT - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_COMPC - jmp __vector_TIMER4_OVF - jmp __vector_TIMER5_CAPT - jmp __vector_TIMER5_COMPA - jmp __vector_TIMER5_COMPB - jmp __vector_TIMER5_COMPC - jmp __vector_TIMER5_OVF - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_TRX24_PLL_LOCK - jmp __vector_TRX24_PLL_UNLOCK - jmp __vector_TRX24_RX_START - jmp __vector_TRX24_RX_END - jmp __vector_TRX24_CCA_ED_DONE - jmp __vector_TRX24_XAH_AMI - jmp __vector_TRX24_TX_END - jmp __vector_TRX24_AWAKE - jmp __vector_SCNT_CMP1 - jmp __vector_SCNT_CMP2 - jmp __vector_SCNT_CMP3 - jmp __vector_SCNT_OVFL - jmp __vector_SCNT_BACKOFF - jmp __vector_AES_READY - jmp __vector_BAT_LOW - jmp __vector_TRX24_TX_START - jmp __vector_TRX24_AMI0 - jmp __vector_TRX24_AMI1 - jmp __vector_TRX24_AMI2 - jmp __vector_TRX24_AMI3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_TIMER4_CAPT - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_COMPC - IRQ __vector_TIMER4_OVF - IRQ __vector_TIMER5_CAPT - IRQ __vector_TIMER5_COMPA - IRQ __vector_TIMER5_COMPB - IRQ __vector_TIMER5_COMPC - IRQ __vector_TIMER5_OVF - IRQ __vector_TRX24_PLL_LOCK - IRQ __vector_TRX24_PLL_UNLOCK - IRQ __vector_TRX24_RX_START - IRQ __vector_TRX24_RX_END - IRQ __vector_TRX24_CCA_ED_DONE - IRQ __vector_TRX24_XAH_AMI - IRQ __vector_TRX24_TX_END - IRQ __vector_TRX24_AWAKE - IRQ __vector_SCNT_CMP1 - IRQ __vector_SCNT_CMP2 - IRQ __vector_SCNT_CMP3 - IRQ __vector_SCNT_OVFL - IRQ __vector_SCNT_BACKOFF - IRQ __vector_AES_READY - IRQ __vector_BAT_LOW - IRQ __vector_TRX24_TX_START - IRQ __vector_TRX24_AMI0 - IRQ __vector_TRX24_AMI1 - IRQ __vector_TRX24_AMI2 - IRQ __vector_TRX24_AMI3 diff --git a/device/avr/atmega256rfr2.go b/device/avr/atmega256rfr2.go index ed2df9f..79296f4 100644 --- a/device/avr/atmega256rfr2.go +++ b/device/avr/atmega256rfr2.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega256rfr2.ld b/device/avr/atmega256rfr2.ld deleted file mode 100644 index 9e15d6e..0000000 --- a/device/avr/atmega256rfr2.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega256RFR2.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x40000; -__ram_start = 0x200; -__ram_size = 0x8000; -__num_isrs = 71; diff --git a/device/avr/atmega256rfr2.s b/device/avr/atmega256rfr2.s deleted file mode 100644 index 6d9a0db..0000000 --- a/device/avr/atmega256rfr2.s +++ /dev/null @@ -1,172 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega256RFR2.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_TIMER4_CAPT - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_COMPC - jmp __vector_TIMER4_OVF - jmp __vector_TIMER5_CAPT - jmp __vector_TIMER5_COMPA - jmp __vector_TIMER5_COMPB - jmp __vector_TIMER5_COMPC - jmp __vector_TIMER5_OVF - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_TRX24_PLL_LOCK - jmp __vector_TRX24_PLL_UNLOCK - jmp __vector_TRX24_RX_START - jmp __vector_TRX24_RX_END - jmp __vector_TRX24_CCA_ED_DONE - jmp __vector_TRX24_XAH_AMI - jmp __vector_TRX24_TX_END - jmp __vector_TRX24_AWAKE - jmp __vector_SCNT_CMP1 - jmp __vector_SCNT_CMP2 - jmp __vector_SCNT_CMP3 - jmp __vector_SCNT_OVFL - jmp __vector_SCNT_BACKOFF - jmp __vector_AES_READY - jmp __vector_BAT_LOW - jmp __vector_TRX24_TX_START - jmp __vector_TRX24_AMI0 - jmp __vector_TRX24_AMI1 - jmp __vector_TRX24_AMI2 - jmp __vector_TRX24_AMI3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_TIMER4_CAPT - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_COMPC - IRQ __vector_TIMER4_OVF - IRQ __vector_TIMER5_CAPT - IRQ __vector_TIMER5_COMPA - IRQ __vector_TIMER5_COMPB - IRQ __vector_TIMER5_COMPC - IRQ __vector_TIMER5_OVF - IRQ __vector_TRX24_PLL_LOCK - IRQ __vector_TRX24_PLL_UNLOCK - IRQ __vector_TRX24_RX_START - IRQ __vector_TRX24_RX_END - IRQ __vector_TRX24_CCA_ED_DONE - IRQ __vector_TRX24_XAH_AMI - IRQ __vector_TRX24_TX_END - IRQ __vector_TRX24_AWAKE - IRQ __vector_SCNT_CMP1 - IRQ __vector_SCNT_CMP2 - IRQ __vector_SCNT_CMP3 - IRQ __vector_SCNT_OVFL - IRQ __vector_SCNT_BACKOFF - IRQ __vector_AES_READY - IRQ __vector_BAT_LOW - IRQ __vector_TRX24_TX_START - IRQ __vector_TRX24_AMI0 - IRQ __vector_TRX24_AMI1 - IRQ __vector_TRX24_AMI2 - IRQ __vector_TRX24_AMI3 diff --git a/device/avr/atmega32.go b/device/avr/atmega32.go index 34bae2b..7d5a274 100644 --- a/device/avr/atmega32.go +++ b/device/avr/atmega32.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -47,8 +47,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega32.ld b/device/avr/atmega32.ld deleted file mode 100644 index 6c3e905..0000000 --- a/device/avr/atmega32.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega32.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x60; -__ram_size = 0x800; -__num_isrs = 21; diff --git a/device/avr/atmega32.s b/device/avr/atmega32.s deleted file mode 100644 index c6cfe16..0000000 --- a/device/avr/atmega32.s +++ /dev/null @@ -1,66 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega32.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RXC - jmp __vector_USART_UDRE - jmp __vector_USART_TXC - jmp __vector_ADC - jmp __vector_EE_RDY - jmp __vector_ANA_COMP - jmp __vector_TWI - jmp __vector_SPM_RDY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RXC - IRQ __vector_USART_UDRE - IRQ __vector_USART_TXC - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_TWI - IRQ __vector_SPM_RDY diff --git a/device/avr/atmega324a.go b/device/avr/atmega324a.go index 1850f60..44758a5 100644 --- a/device/avr/atmega324a.go +++ b/device/avr/atmega324a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega324a.ld b/device/avr/atmega324a.ld deleted file mode 100644 index 4abf857..0000000 --- a/device/avr/atmega324a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega324A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 31; diff --git a/device/avr/atmega324a.s b/device/avr/atmega324a.s deleted file mode 100644 index b08c776..0000000 --- a/device/avr/atmega324a.s +++ /dev/null @@ -1,86 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega324A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX diff --git a/device/avr/atmega324p.go b/device/avr/atmega324p.go index 8a30b5b..1a79151 100644 --- a/device/avr/atmega324p.go +++ b/device/avr/atmega324p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega324p.ld b/device/avr/atmega324p.ld deleted file mode 100644 index 400f756..0000000 --- a/device/avr/atmega324p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega324P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 31; diff --git a/device/avr/atmega324p.s b/device/avr/atmega324p.s deleted file mode 100644 index 4cc9146..0000000 --- a/device/avr/atmega324p.s +++ /dev/null @@ -1,86 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega324P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX diff --git a/device/avr/atmega324pa.go b/device/avr/atmega324pa.go index 7f17397..848b30a 100644 --- a/device/avr/atmega324pa.go +++ b/device/avr/atmega324pa.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega324pa.ld b/device/avr/atmega324pa.ld deleted file mode 100644 index 01f86d1..0000000 --- a/device/avr/atmega324pa.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega324PA.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 31; diff --git a/device/avr/atmega324pa.s b/device/avr/atmega324pa.s deleted file mode 100644 index 8106634..0000000 --- a/device/avr/atmega324pa.s +++ /dev/null @@ -1,86 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega324PA.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX diff --git a/device/avr/atmega324pb.go b/device/avr/atmega324pb.go index f326f22..960e668 100644 --- a/device/avr/atmega324pb.go +++ b/device/avr/atmega324pb.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -80,8 +80,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega324pb.ld b/device/avr/atmega324pb.ld deleted file mode 100644 index 515f911..0000000 --- a/device/avr/atmega324pb.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega324PB.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 54; diff --git a/device/avr/atmega324pb.s b/device/avr/atmega324pb.s deleted file mode 100644 index 7c569cf..0000000 --- a/device/avr/atmega324pb.s +++ /dev/null @@ -1,129 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega324PB.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI0_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TWI0 - jmp __vector_SPM_READY - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_OVF - jmp __vector_USART0_RXS - jmp __vector_USART1_RXS - jmp __vector_PCINT4 - jmp __vector_XOSCFD - jmp __vector_PTC_EOC - jmp __vector_PTC_WCOMP - jmp __vector_SPI1_STC - jmp __vector_TWI1 - jmp __vector_TIMER4_CAPT - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_OVF - jmp __vector_USART2_RX - jmp __vector_USART2_UDRE - jmp __vector_USART2_TX - jmp __vector_USART2_RXS - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI0_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TWI0 - IRQ __vector_SPM_READY - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_OVF - IRQ __vector_USART0_RXS - IRQ __vector_USART0_START - IRQ __vector_USART1_RXS - IRQ __vector_USART1_START - IRQ __vector_PCINT4 - IRQ __vector_XOSCFD - IRQ __vector_PTC_EOC - IRQ __vector_PTC_WCOMP - IRQ __vector_SPI1_STC - IRQ __vector_TWI1 - IRQ __vector_TIMER4_CAPT - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_OVF - IRQ __vector_USART2_RX - IRQ __vector_USART2_UDRE - IRQ __vector_USART2_TX - IRQ __vector_USART2_RXS - IRQ __vector_USART2_START diff --git a/device/avr/atmega325.go b/device/avr/atmega325.go index 070d3d9..31afe06 100644 --- a/device/avr/atmega325.go +++ b/device/avr/atmega325.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -48,8 +48,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega325.ld b/device/avr/atmega325.ld deleted file mode 100644 index 1a8fc62..0000000 --- a/device/avr/atmega325.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega325.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 22; diff --git a/device/avr/atmega325.s b/device/avr/atmega325.s deleted file mode 100644 index e03a0cc..0000000 --- a/device/avr/atmega325.s +++ /dev/null @@ -1,68 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega325.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega3250.go b/device/avr/atmega3250.go index 380c001..eba0271 100644 --- a/device/avr/atmega3250.go +++ b/device/avr/atmega3250.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega3250.ld b/device/avr/atmega3250.ld deleted file mode 100644 index 07b234a..0000000 --- a/device/avr/atmega3250.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega3250.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 25; diff --git a/device/avr/atmega3250.s b/device/avr/atmega3250.s deleted file mode 100644 index 8df525b..0000000 --- a/device/avr/atmega3250.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega3250.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_NOT_USED - jmp __vector_PCINT2 - jmp __vector_PCINT3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_NOT_USED - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 diff --git a/device/avr/atmega3250a.go b/device/avr/atmega3250a.go index 27b85fd..9d6abab 100644 --- a/device/avr/atmega3250a.go +++ b/device/avr/atmega3250a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega3250a.ld b/device/avr/atmega3250a.ld deleted file mode 100644 index fedc239..0000000 --- a/device/avr/atmega3250a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega3250A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 25; diff --git a/device/avr/atmega3250a.s b/device/avr/atmega3250a.s deleted file mode 100644 index 0a3b0cb..0000000 --- a/device/avr/atmega3250a.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega3250A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_NOT_USED - jmp __vector_PCINT2 - jmp __vector_PCINT3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_NOT_USED - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 diff --git a/device/avr/atmega3250p.go b/device/avr/atmega3250p.go index 9139ca5..97b9f3c 100644 --- a/device/avr/atmega3250p.go +++ b/device/avr/atmega3250p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega3250p.ld b/device/avr/atmega3250p.ld deleted file mode 100644 index 2c08b8d..0000000 --- a/device/avr/atmega3250p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega3250P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 25; diff --git a/device/avr/atmega3250p.s b/device/avr/atmega3250p.s deleted file mode 100644 index 0ca1f9b..0000000 --- a/device/avr/atmega3250p.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega3250P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_NOT_USED - jmp __vector_PCINT2 - jmp __vector_PCINT3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_NOT_USED - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 diff --git a/device/avr/atmega3250pa.go b/device/avr/atmega3250pa.go index 51e6e8b..6f42338 100644 --- a/device/avr/atmega3250pa.go +++ b/device/avr/atmega3250pa.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega3250pa.ld b/device/avr/atmega3250pa.ld deleted file mode 100644 index 9365291..0000000 --- a/device/avr/atmega3250pa.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega3250PA.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 25; diff --git a/device/avr/atmega3250pa.s b/device/avr/atmega3250pa.s deleted file mode 100644 index 898cdcd..0000000 --- a/device/avr/atmega3250pa.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega3250PA.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_NOT_USED - jmp __vector_PCINT2 - jmp __vector_PCINT3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_NOT_USED - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 diff --git a/device/avr/atmega325a.go b/device/avr/atmega325a.go index c7979ba..c25858f 100644 --- a/device/avr/atmega325a.go +++ b/device/avr/atmega325a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -48,8 +48,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega325a.ld b/device/avr/atmega325a.ld deleted file mode 100644 index f82c0fc..0000000 --- a/device/avr/atmega325a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega325A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 22; diff --git a/device/avr/atmega325a.s b/device/avr/atmega325a.s deleted file mode 100644 index 6974df4..0000000 --- a/device/avr/atmega325a.s +++ /dev/null @@ -1,68 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega325A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega325p.go b/device/avr/atmega325p.go index e1b13e9..1cee038 100644 --- a/device/avr/atmega325p.go +++ b/device/avr/atmega325p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -48,8 +48,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega325p.ld b/device/avr/atmega325p.ld deleted file mode 100644 index 6f63f64..0000000 --- a/device/avr/atmega325p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega325P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 22; diff --git a/device/avr/atmega325p.s b/device/avr/atmega325p.s deleted file mode 100644 index 5884588..0000000 --- a/device/avr/atmega325p.s +++ /dev/null @@ -1,68 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega325P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega325pa.go b/device/avr/atmega325pa.go index 4eef01d..8826159 100644 --- a/device/avr/atmega325pa.go +++ b/device/avr/atmega325pa.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -48,8 +48,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega325pa.ld b/device/avr/atmega325pa.ld deleted file mode 100644 index bfc4ee3..0000000 --- a/device/avr/atmega325pa.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega325PA.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 22; diff --git a/device/avr/atmega325pa.s b/device/avr/atmega325pa.s deleted file mode 100644 index 1b84fd7..0000000 --- a/device/avr/atmega325pa.s +++ /dev/null @@ -1,68 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega325PA.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega328.go b/device/avr/atmega328.go index e28bacf..1c278f0 100644 --- a/device/avr/atmega328.go +++ b/device/avr/atmega328.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega328.ld b/device/avr/atmega328.ld deleted file mode 100644 index 081e47a..0000000 --- a/device/avr/atmega328.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega328.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 26; diff --git a/device/avr/atmega328.s b/device/avr/atmega328.s deleted file mode 100644 index 4478a06..0000000 --- a/device/avr/atmega328.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega328.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART_TX - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_ANALOG_COMP - jmp __vector_TWI - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_READY diff --git a/device/avr/atmega328p.go b/device/avr/atmega328p.go index 1a7f2e8..df4bfcc 100644 --- a/device/avr/atmega328p.go +++ b/device/avr/atmega328p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega328p.ld b/device/avr/atmega328p.ld deleted file mode 100644 index 220e0a9..0000000 --- a/device/avr/atmega328p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega328P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 26; diff --git a/device/avr/atmega328p.s b/device/avr/atmega328p.s deleted file mode 100644 index 6faa7be..0000000 --- a/device/avr/atmega328p.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega328P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART_TX - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_ANALOG_COMP - jmp __vector_TWI - jmp __vector_SPM_Ready - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready diff --git a/device/avr/atmega328pb.go b/device/avr/atmega328pb.go index 7e049e0..4250d64 100644 --- a/device/avr/atmega328pb.go +++ b/device/avr/atmega328pb.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -71,8 +71,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega328pb.ld b/device/avr/atmega328pb.ld deleted file mode 100644 index e185b1b..0000000 --- a/device/avr/atmega328pb.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega328PB.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 45; diff --git a/device/avr/atmega328pb.s b/device/avr/atmega328pb.s deleted file mode 100644 index a7b0acd..0000000 --- a/device/avr/atmega328pb.s +++ /dev/null @@ -1,114 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega328PB.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI0_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_ANALOG_COMP - jmp __vector_TWI0 - jmp __vector_SPM_Ready - jmp __vector_USART0_START - jmp __vector_PCINT3 - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_USART1_START - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_OVF - jmp __vector_CFD - jmp __vector_PTC_EOC - jmp __vector_PTC_WCOMP - jmp __vector_SPI1_STC - jmp __vector_TWI1 - jmp __vector_TIMER4_CAPT - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI0_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI0 - IRQ __vector_SPM_Ready - IRQ __vector_USART0_START - IRQ __vector_PCINT3 - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_USART1_START - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_OVF - IRQ __vector_CFD - IRQ __vector_PTC_EOC - IRQ __vector_PTC_WCOMP - IRQ __vector_SPI1_STC - IRQ __vector_TWI1 - IRQ __vector_TIMER4_CAPT - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_OVF diff --git a/device/avr/atmega329.go b/device/avr/atmega329.go index 6779d9b..cad18ce 100644 --- a/device/avr/atmega329.go +++ b/device/avr/atmega329.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -49,8 +49,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega329.ld b/device/avr/atmega329.ld deleted file mode 100644 index 9e5af15..0000000 --- a/device/avr/atmega329.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega329.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 23; diff --git a/device/avr/atmega329.s b/device/avr/atmega329.s deleted file mode 100644 index 9b3d551..0000000 --- a/device/avr/atmega329.s +++ /dev/null @@ -1,70 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega329.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD diff --git a/device/avr/atmega3290.go b/device/avr/atmega3290.go index c4098e8..975099d 100644 --- a/device/avr/atmega3290.go +++ b/device/avr/atmega3290.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega3290.ld b/device/avr/atmega3290.ld deleted file mode 100644 index 22f361d..0000000 --- a/device/avr/atmega3290.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega3290.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 25; diff --git a/device/avr/atmega3290.s b/device/avr/atmega3290.s deleted file mode 100644 index 9ff619a..0000000 --- a/device/avr/atmega3290.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega3290.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - jmp __vector_PCINT2 - jmp __vector_PCINT3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 diff --git a/device/avr/atmega3290a.go b/device/avr/atmega3290a.go index c6297de..2b0cbc4 100644 --- a/device/avr/atmega3290a.go +++ b/device/avr/atmega3290a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega3290a.ld b/device/avr/atmega3290a.ld deleted file mode 100644 index 5941228..0000000 --- a/device/avr/atmega3290a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega3290A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 25; diff --git a/device/avr/atmega3290a.s b/device/avr/atmega3290a.s deleted file mode 100644 index 45a9a6c..0000000 --- a/device/avr/atmega3290a.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega3290A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - jmp __vector_PCINT2 - jmp __vector_PCINT3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 diff --git a/device/avr/atmega3290p.go b/device/avr/atmega3290p.go index 1c9e771..5159aa4 100644 --- a/device/avr/atmega3290p.go +++ b/device/avr/atmega3290p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega3290p.ld b/device/avr/atmega3290p.ld deleted file mode 100644 index 10be822..0000000 --- a/device/avr/atmega3290p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega3290P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 25; diff --git a/device/avr/atmega3290p.s b/device/avr/atmega3290p.s deleted file mode 100644 index b8edcb4..0000000 --- a/device/avr/atmega3290p.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega3290P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - jmp __vector_PCINT2 - jmp __vector_PCINT3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 diff --git a/device/avr/atmega3290pa.go b/device/avr/atmega3290pa.go index df9763c..c72d35a 100644 --- a/device/avr/atmega3290pa.go +++ b/device/avr/atmega3290pa.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega3290pa.ld b/device/avr/atmega3290pa.ld deleted file mode 100644 index 7a324bb..0000000 --- a/device/avr/atmega3290pa.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega3290PA.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 25; diff --git a/device/avr/atmega3290pa.s b/device/avr/atmega3290pa.s deleted file mode 100644 index d6e6311..0000000 --- a/device/avr/atmega3290pa.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega3290PA.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - jmp __vector_PCINT2 - jmp __vector_PCINT3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 diff --git a/device/avr/atmega329a.go b/device/avr/atmega329a.go index b17ff20..f537ba6 100644 --- a/device/avr/atmega329a.go +++ b/device/avr/atmega329a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -49,8 +49,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega329a.ld b/device/avr/atmega329a.ld deleted file mode 100644 index ba61325..0000000 --- a/device/avr/atmega329a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega329A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 23; diff --git a/device/avr/atmega329a.s b/device/avr/atmega329a.s deleted file mode 100644 index e07d80a..0000000 --- a/device/avr/atmega329a.s +++ /dev/null @@ -1,70 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega329A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD diff --git a/device/avr/atmega329p.go b/device/avr/atmega329p.go index 79d54d3..c7d9e1a 100644 --- a/device/avr/atmega329p.go +++ b/device/avr/atmega329p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -49,8 +49,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega329p.ld b/device/avr/atmega329p.ld deleted file mode 100644 index fd94bce..0000000 --- a/device/avr/atmega329p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega329P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 23; diff --git a/device/avr/atmega329p.s b/device/avr/atmega329p.s deleted file mode 100644 index faafeb8..0000000 --- a/device/avr/atmega329p.s +++ /dev/null @@ -1,70 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega329P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD diff --git a/device/avr/atmega329pa.go b/device/avr/atmega329pa.go index 7bcc7fb..0dc96c2 100644 --- a/device/avr/atmega329pa.go +++ b/device/avr/atmega329pa.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -49,8 +49,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega329pa.ld b/device/avr/atmega329pa.ld deleted file mode 100644 index 2741fe1..0000000 --- a/device/avr/atmega329pa.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega329PA.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 23; diff --git a/device/avr/atmega329pa.s b/device/avr/atmega329pa.s deleted file mode 100644 index f77042a..0000000 --- a/device/avr/atmega329pa.s +++ /dev/null @@ -1,70 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega329PA.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD diff --git a/device/avr/atmega32a.go b/device/avr/atmega32a.go index 7e096df..130e7aa 100644 --- a/device/avr/atmega32a.go +++ b/device/avr/atmega32a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -47,8 +47,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega32a.ld b/device/avr/atmega32a.ld deleted file mode 100644 index 9726386..0000000 --- a/device/avr/atmega32a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega32A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x60; -__ram_size = 0x800; -__num_isrs = 21; diff --git a/device/avr/atmega32a.s b/device/avr/atmega32a.s deleted file mode 100644 index 1bb5548..0000000 --- a/device/avr/atmega32a.s +++ /dev/null @@ -1,66 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega32A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RXC - jmp __vector_USART_UDRE - jmp __vector_USART_TXC - jmp __vector_ADC - jmp __vector_EE_RDY - jmp __vector_ANA_COMP - jmp __vector_TWI - jmp __vector_SPM_RDY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RXC - IRQ __vector_USART_UDRE - IRQ __vector_USART_TXC - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_TWI - IRQ __vector_SPM_RDY diff --git a/device/avr/atmega32c1.go b/device/avr/atmega32c1.go index 11b986f..9bbfc0b 100644 --- a/device/avr/atmega32c1.go +++ b/device/avr/atmega32c1.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega32c1.ld b/device/avr/atmega32c1.ld deleted file mode 100644 index ef7079e..0000000 --- a/device/avr/atmega32c1.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega32C1.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 31; diff --git a/device/avr/atmega32c1.s b/device/avr/atmega32c1.s deleted file mode 100644 index 9a6cacb..0000000 --- a/device/avr/atmega32c1.s +++ /dev/null @@ -1,86 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega32C1.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_ANACOMP0 - jmp __vector_ANACOMP1 - jmp __vector_ANACOMP2 - jmp __vector_ANACOMP3 - jmp __vector_PSC_FAULT - jmp __vector_PSC_EC - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_CAN_INT - jmp __vector_CAN_TOVF - jmp __vector_LIN_TC - jmp __vector_LIN_ERR - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_SPI_STC - jmp __vector_ADC - jmp __vector_WDT - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_ANACOMP0 - IRQ __vector_ANACOMP1 - IRQ __vector_ANACOMP2 - IRQ __vector_ANACOMP3 - IRQ __vector_PSC_FAULT - IRQ __vector_PSC_EC - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_CAN_INT - IRQ __vector_CAN_TOVF - IRQ __vector_LIN_TC - IRQ __vector_LIN_ERR - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_SPI_STC - IRQ __vector_ADC - IRQ __vector_WDT - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega32hvb.go b/device/avr/atmega32hvb.go index 0ee58ce..89606e5 100644 --- a/device/avr/atmega32hvb.go +++ b/device/avr/atmega32hvb.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -55,8 +55,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega32hvb.ld b/device/avr/atmega32hvb.ld deleted file mode 100644 index 5de9aca..0000000 --- a/device/avr/atmega32hvb.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega32HVB.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 29; diff --git a/device/avr/atmega32hvb.s b/device/avr/atmega32hvb.s deleted file mode 100644 index c529c26..0000000 --- a/device/avr/atmega32hvb.s +++ /dev/null @@ -1,82 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega32HVB.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_BPINT - jmp __vector_VREGMON - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_WDT - jmp __vector_BGSCD - jmp __vector_CHDET - jmp __vector_TIMER1_IC - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_IC - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_TWIBUSCD - jmp __vector_TWI - jmp __vector_SPI_STC - jmp __vector_VADC - jmp __vector_CCADC_CONV - jmp __vector_CCADC_REG_CUR - jmp __vector_CCADC_ACC - jmp __vector_EE_READY - jmp __vector_SPM - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_BPINT - IRQ __vector_VREGMON - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_BGSCD - IRQ __vector_CHDET - IRQ __vector_TIMER1_IC - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_IC - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_TWIBUSCD - IRQ __vector_TWI - IRQ __vector_SPI_STC - IRQ __vector_VADC - IRQ __vector_CCADC_CONV - IRQ __vector_CCADC_REG_CUR - IRQ __vector_CCADC_ACC - IRQ __vector_EE_READY - IRQ __vector_SPM diff --git a/device/avr/atmega32hvbrevb.go b/device/avr/atmega32hvbrevb.go index 97ea4b9..6525bdf 100644 --- a/device/avr/atmega32hvbrevb.go +++ b/device/avr/atmega32hvbrevb.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -55,8 +55,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega32hvbrevb.ld b/device/avr/atmega32hvbrevb.ld deleted file mode 100644 index a859c3b..0000000 --- a/device/avr/atmega32hvbrevb.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega32HVBrevB.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 29; diff --git a/device/avr/atmega32hvbrevb.s b/device/avr/atmega32hvbrevb.s deleted file mode 100644 index 1957202..0000000 --- a/device/avr/atmega32hvbrevb.s +++ /dev/null @@ -1,82 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega32HVBrevB.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_BPINT - jmp __vector_VREGMON - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_WDT - jmp __vector_BGSCD - jmp __vector_CHDET - jmp __vector_TIMER1_IC - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_IC - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_TWIBUSCD - jmp __vector_TWI - jmp __vector_SPI_STC - jmp __vector_VADC - jmp __vector_CCADC_CONV - jmp __vector_CCADC_REG_CUR - jmp __vector_CCADC_ACC - jmp __vector_EE_READY - jmp __vector_SPM - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_BPINT - IRQ __vector_VREGMON - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_BGSCD - IRQ __vector_CHDET - IRQ __vector_TIMER1_IC - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_IC - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_TWIBUSCD - IRQ __vector_TWI - IRQ __vector_SPI_STC - IRQ __vector_VADC - IRQ __vector_CCADC_CONV - IRQ __vector_CCADC_REG_CUR - IRQ __vector_CCADC_ACC - IRQ __vector_EE_READY - IRQ __vector_SPM diff --git a/device/avr/atmega32m1.go b/device/avr/atmega32m1.go index 9cc41a8..c4226f8 100644 --- a/device/avr/atmega32m1.go +++ b/device/avr/atmega32m1.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega32m1.ld b/device/avr/atmega32m1.ld deleted file mode 100644 index 6f96611..0000000 --- a/device/avr/atmega32m1.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega32M1.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 31; diff --git a/device/avr/atmega32m1.s b/device/avr/atmega32m1.s deleted file mode 100644 index 33565bd..0000000 --- a/device/avr/atmega32m1.s +++ /dev/null @@ -1,86 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega32M1.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_ANACOMP0 - jmp __vector_ANACOMP1 - jmp __vector_ANACOMP2 - jmp __vector_ANACOMP3 - jmp __vector_PSC_FAULT - jmp __vector_PSC_EC - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_CAN_INT - jmp __vector_CAN_TOVF - jmp __vector_LIN_TC - jmp __vector_LIN_ERR - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_SPI_STC - jmp __vector_ADC - jmp __vector_WDT - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_ANACOMP0 - IRQ __vector_ANACOMP1 - IRQ __vector_ANACOMP2 - IRQ __vector_ANACOMP3 - IRQ __vector_PSC_FAULT - IRQ __vector_PSC_EC - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_CAN_INT - IRQ __vector_CAN_TOVF - IRQ __vector_LIN_TC - IRQ __vector_LIN_ERR - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_SPI_STC - IRQ __vector_ADC - IRQ __vector_WDT - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega32u2.go b/device/avr/atmega32u2.go index 45db353..a5122a1 100644 --- a/device/avr/atmega32u2.go +++ b/device/avr/atmega32u2.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -55,8 +55,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega32u2.ld b/device/avr/atmega32u2.ld deleted file mode 100644 index 0d9544b..0000000 --- a/device/avr/atmega32u2.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega32U2.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 29; diff --git a/device/avr/atmega32u2.s b/device/avr/atmega32u2.s deleted file mode 100644 index ec1e6e3..0000000 --- a/device/avr/atmega32u2.s +++ /dev/null @@ -1,82 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega32U2.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_USB_GEN - jmp __vector_USB_COM - jmp __vector_WDT - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_ANALOG_COMP - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_USB_GEN - IRQ __vector_USB_COM - IRQ __vector_WDT - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega32u4.go b/device/avr/atmega32u4.go index 142feb1..15bec15 100644 --- a/device/avr/atmega32u4.go +++ b/device/avr/atmega32u4.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -69,8 +69,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega32u4.ld b/device/avr/atmega32u4.ld deleted file mode 100644 index 41bd894..0000000 --- a/device/avr/atmega32u4.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega32U4.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__ram_start = 0x100; -__ram_size = 0xa00; -__num_isrs = 43; diff --git a/device/avr/atmega32u4.s b/device/avr/atmega32u4.s deleted file mode 100644 index 2711974..0000000 --- a/device/avr/atmega32u4.s +++ /dev/null @@ -1,110 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega32U4.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_Reserved1 - jmp __vector_Reserved2 - jmp __vector_INT6 - jmp __vector_Reserved3 - jmp __vector_PCINT0 - jmp __vector_USB_GEN - jmp __vector_USB_COM - jmp __vector_WDT - jmp __vector_Reserved4 - jmp __vector_Reserved5 - jmp __vector_Reserved6 - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_COMPD - jmp __vector_TIMER4_OVF - jmp __vector_TIMER4_FPF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_Reserved1 - IRQ __vector_Reserved2 - IRQ __vector_INT6 - IRQ __vector_Reserved3 - IRQ __vector_PCINT0 - IRQ __vector_USB_GEN - IRQ __vector_USB_COM - IRQ __vector_WDT - IRQ __vector_Reserved4 - IRQ __vector_Reserved5 - IRQ __vector_Reserved6 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_COMPD - IRQ __vector_TIMER4_OVF - IRQ __vector_TIMER4_FPF diff --git a/device/avr/atmega406.go b/device/avr/atmega406.go index 97faacf..14edb3f 100644 --- a/device/avr/atmega406.go +++ b/device/avr/atmega406.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -49,8 +49,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega406.ld b/device/avr/atmega406.ld deleted file mode 100644 index 3c7d70a..0000000 --- a/device/avr/atmega406.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega406.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0xa000; -__ram_start = 0x100; -__ram_size = 0x800; -__num_isrs = 23; diff --git a/device/avr/atmega406.s b/device/avr/atmega406.s deleted file mode 100644 index 8b454a8..0000000 --- a/device/avr/atmega406.s +++ /dev/null @@ -1,70 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega406.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_BPINT - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_WDT - jmp __vector_WAKE_UP - jmp __vector_TIM1_COMP - jmp __vector_TIM1_OVF - jmp __vector_TIM0_COMPA - jmp __vector_TIM0_COMPB - jmp __vector_TIM0_OVF - jmp __vector_TWI_BUS_CD - jmp __vector_TWI - jmp __vector_VADC - jmp __vector_CCADC_CONV - jmp __vector_CCADC_REG_CUR - jmp __vector_CCADC_ACC - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_BPINT - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_WAKE_UP - IRQ __vector_TIM1_COMP - IRQ __vector_TIM1_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_TIM0_OVF - IRQ __vector_TWI_BUS_CD - IRQ __vector_TWI - IRQ __vector_VADC - IRQ __vector_CCADC_CONV - IRQ __vector_CCADC_REG_CUR - IRQ __vector_CCADC_ACC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega48.go b/device/avr/atmega48.go index c6667a9..42381b4 100644 --- a/device/avr/atmega48.go +++ b/device/avr/atmega48.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega48.ld b/device/avr/atmega48.ld deleted file mode 100644 index 9f7d0c6..0000000 --- a/device/avr/atmega48.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega48.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 26; diff --git a/device/avr/atmega48.s b/device/avr/atmega48.s deleted file mode 100644 index a63d533..0000000 --- a/device/avr/atmega48.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega48.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_WDT - rjmp __vector_TIMER2_COMPA - rjmp __vector_TIMER2_COMPB - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ADC - rjmp __vector_EE_READY - rjmp __vector_ANALOG_COMP - rjmp __vector_TWI - rjmp __vector_SPM_Ready - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready diff --git a/device/avr/atmega48a.go b/device/avr/atmega48a.go index a6b0506..61c470a 100644 --- a/device/avr/atmega48a.go +++ b/device/avr/atmega48a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega48a.ld b/device/avr/atmega48a.ld deleted file mode 100644 index 2905790..0000000 --- a/device/avr/atmega48a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega48A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 26; diff --git a/device/avr/atmega48a.s b/device/avr/atmega48a.s deleted file mode 100644 index a4abca1..0000000 --- a/device/avr/atmega48a.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega48A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_WDT - rjmp __vector_TIMER2_COMPA - rjmp __vector_TIMER2_COMPB - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ADC - rjmp __vector_EE_READY - rjmp __vector_ANALOG_COMP - rjmp __vector_TWI - rjmp __vector_SPM_Ready - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready diff --git a/device/avr/atmega48p.go b/device/avr/atmega48p.go index 1d7d8be..a8dd91c 100644 --- a/device/avr/atmega48p.go +++ b/device/avr/atmega48p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega48p.ld b/device/avr/atmega48p.ld deleted file mode 100644 index 771b2f3..0000000 --- a/device/avr/atmega48p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega48P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 26; diff --git a/device/avr/atmega48p.s b/device/avr/atmega48p.s deleted file mode 100644 index a1b9589..0000000 --- a/device/avr/atmega48p.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega48P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_WDT - rjmp __vector_TIMER2_COMPA - rjmp __vector_TIMER2_COMPB - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ADC - rjmp __vector_EE_READY - rjmp __vector_ANALOG_COMP - rjmp __vector_TWI - rjmp __vector_SPM_Ready - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready diff --git a/device/avr/atmega48pa.go b/device/avr/atmega48pa.go index 9e5a3fd..01e0993 100644 --- a/device/avr/atmega48pa.go +++ b/device/avr/atmega48pa.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega48pa.ld b/device/avr/atmega48pa.ld deleted file mode 100644 index 4336701..0000000 --- a/device/avr/atmega48pa.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega48PA.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 26; diff --git a/device/avr/atmega48pa.s b/device/avr/atmega48pa.s deleted file mode 100644 index 267658b..0000000 --- a/device/avr/atmega48pa.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega48PA.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_WDT - rjmp __vector_TIMER2_COMPA - rjmp __vector_TIMER2_COMPB - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ADC - rjmp __vector_EE_READY - rjmp __vector_ANALOG_COMP - rjmp __vector_TWI - rjmp __vector_SPM_Ready - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready diff --git a/device/avr/atmega48pb.go b/device/avr/atmega48pb.go index 4bb47af..4357188 100644 --- a/device/avr/atmega48pb.go +++ b/device/avr/atmega48pb.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -53,8 +53,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega48pb.ld b/device/avr/atmega48pb.ld deleted file mode 100644 index bd3522b..0000000 --- a/device/avr/atmega48pb.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega48PB.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 27; diff --git a/device/avr/atmega48pb.s b/device/avr/atmega48pb.s deleted file mode 100644 index bbff0ba..0000000 --- a/device/avr/atmega48pb.s +++ /dev/null @@ -1,78 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega48PB.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_WDT - rjmp __vector_TIMER2_COMPA - rjmp __vector_TIMER2_COMPB - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ADC - rjmp __vector_EE_READY - rjmp __vector_ANALOG_COMP - rjmp __vector_TWI - rjmp __vector_SPM_Ready - rjmp __vector_USART_START - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready - IRQ __vector_USART_START diff --git a/device/avr/atmega64.go b/device/avr/atmega64.go index 93a1eda..263d59d 100644 --- a/device/avr/atmega64.go +++ b/device/avr/atmega64.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -61,8 +61,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega64.ld b/device/avr/atmega64.ld deleted file mode 100644 index 0a16ea0..0000000 --- a/device/avr/atmega64.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega64.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 35; diff --git a/device/avr/atmega64.s b/device/avr/atmega64.s deleted file mode 100644 index f42b554..0000000 --- a/device/avr/atmega64.s +++ /dev/null @@ -1,94 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega64.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_ANALOG_COMP - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY diff --git a/device/avr/atmega640.go b/device/avr/atmega640.go index b851781..277789c 100644 --- a/device/avr/atmega640.go +++ b/device/avr/atmega640.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -83,8 +83,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega640.ld b/device/avr/atmega640.ld deleted file mode 100644 index 2d2e093..0000000 --- a/device/avr/atmega640.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega640.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x200; -__ram_size = 0x2000; -__num_isrs = 57; diff --git a/device/avr/atmega640.s b/device/avr/atmega640.s deleted file mode 100644 index 46b9b5b..0000000 --- a/device/avr/atmega640.s +++ /dev/null @@ -1,138 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega640.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_TIMER4_CAPT - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_COMPC - jmp __vector_TIMER4_OVF - jmp __vector_TIMER5_CAPT - jmp __vector_TIMER5_COMPA - jmp __vector_TIMER5_COMPB - jmp __vector_TIMER5_COMPC - jmp __vector_TIMER5_OVF - jmp __vector_USART2_RX - jmp __vector_USART2_UDRE - jmp __vector_USART2_TX - jmp __vector_USART3_RX - jmp __vector_USART3_UDRE - jmp __vector_USART3_TX - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_TIMER4_CAPT - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_COMPC - IRQ __vector_TIMER4_OVF - IRQ __vector_TIMER5_CAPT - IRQ __vector_TIMER5_COMPA - IRQ __vector_TIMER5_COMPB - IRQ __vector_TIMER5_COMPC - IRQ __vector_TIMER5_OVF - IRQ __vector_USART2_RX - IRQ __vector_USART2_UDRE - IRQ __vector_USART2_TX - IRQ __vector_USART3_RX - IRQ __vector_USART3_UDRE - IRQ __vector_USART3_TX diff --git a/device/avr/atmega644.go b/device/avr/atmega644.go index e265484..a4b21be 100644 --- a/device/avr/atmega644.go +++ b/device/avr/atmega644.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -54,8 +54,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega644.ld b/device/avr/atmega644.ld deleted file mode 100644 index 3896dcc..0000000 --- a/device/avr/atmega644.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega644.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 28; diff --git a/device/avr/atmega644.s b/device/avr/atmega644.s deleted file mode 100644 index eba5032..0000000 --- a/device/avr/atmega644.s +++ /dev/null @@ -1,80 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega644.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TWI - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TWI - IRQ __vector_SPM_READY diff --git a/device/avr/atmega644a.go b/device/avr/atmega644a.go index 02b6b7a..fcd1c6f 100644 --- a/device/avr/atmega644a.go +++ b/device/avr/atmega644a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega644a.ld b/device/avr/atmega644a.ld deleted file mode 100644 index f44cc29..0000000 --- a/device/avr/atmega644a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega644A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 31; diff --git a/device/avr/atmega644a.s b/device/avr/atmega644a.s deleted file mode 100644 index aacfaeb..0000000 --- a/device/avr/atmega644a.s +++ /dev/null @@ -1,86 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega644A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX diff --git a/device/avr/atmega644p.go b/device/avr/atmega644p.go index 229ae21..442a271 100644 --- a/device/avr/atmega644p.go +++ b/device/avr/atmega644p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega644p.ld b/device/avr/atmega644p.ld deleted file mode 100644 index ae17a6f..0000000 --- a/device/avr/atmega644p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega644P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 31; diff --git a/device/avr/atmega644p.s b/device/avr/atmega644p.s deleted file mode 100644 index a9c5756..0000000 --- a/device/avr/atmega644p.s +++ /dev/null @@ -1,86 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega644P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX diff --git a/device/avr/atmega644pa.go b/device/avr/atmega644pa.go index 7dfea9b..aaec110 100644 --- a/device/avr/atmega644pa.go +++ b/device/avr/atmega644pa.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega644pa.ld b/device/avr/atmega644pa.ld deleted file mode 100644 index 4bf9745..0000000 --- a/device/avr/atmega644pa.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega644PA.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 31; diff --git a/device/avr/atmega644pa.s b/device/avr/atmega644pa.s deleted file mode 100644 index 5898ee6..0000000 --- a/device/avr/atmega644pa.s +++ /dev/null @@ -1,86 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega644PA.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX diff --git a/device/avr/atmega644rfr2.go b/device/avr/atmega644rfr2.go index 83e2d1e..a94c3da 100644 --- a/device/avr/atmega644rfr2.go +++ b/device/avr/atmega644rfr2.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega644rfr2.ld b/device/avr/atmega644rfr2.ld deleted file mode 100644 index 555a24d..0000000 --- a/device/avr/atmega644rfr2.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega644RFR2.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x200; -__ram_size = 0x2000; -__num_isrs = 71; diff --git a/device/avr/atmega644rfr2.s b/device/avr/atmega644rfr2.s deleted file mode 100644 index ee07aad..0000000 --- a/device/avr/atmega644rfr2.s +++ /dev/null @@ -1,172 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega644RFR2.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_TIMER4_CAPT - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_COMPC - jmp __vector_TIMER4_OVF - jmp __vector_TIMER5_CAPT - jmp __vector_TIMER5_COMPA - jmp __vector_TIMER5_COMPB - jmp __vector_TIMER5_COMPC - jmp __vector_TIMER5_OVF - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_TRX24_PLL_LOCK - jmp __vector_TRX24_PLL_UNLOCK - jmp __vector_TRX24_RX_START - jmp __vector_TRX24_RX_END - jmp __vector_TRX24_CCA_ED_DONE - jmp __vector_TRX24_XAH_AMI - jmp __vector_TRX24_TX_END - jmp __vector_TRX24_AWAKE - jmp __vector_SCNT_CMP1 - jmp __vector_SCNT_CMP2 - jmp __vector_SCNT_CMP3 - jmp __vector_SCNT_OVFL - jmp __vector_SCNT_BACKOFF - jmp __vector_AES_READY - jmp __vector_BAT_LOW - jmp __vector_TRX24_TX_START - jmp __vector_TRX24_AMI0 - jmp __vector_TRX24_AMI1 - jmp __vector_TRX24_AMI2 - jmp __vector_TRX24_AMI3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_TIMER4_CAPT - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_COMPC - IRQ __vector_TIMER4_OVF - IRQ __vector_TIMER5_CAPT - IRQ __vector_TIMER5_COMPA - IRQ __vector_TIMER5_COMPB - IRQ __vector_TIMER5_COMPC - IRQ __vector_TIMER5_OVF - IRQ __vector_TRX24_PLL_LOCK - IRQ __vector_TRX24_PLL_UNLOCK - IRQ __vector_TRX24_RX_START - IRQ __vector_TRX24_RX_END - IRQ __vector_TRX24_CCA_ED_DONE - IRQ __vector_TRX24_XAH_AMI - IRQ __vector_TRX24_TX_END - IRQ __vector_TRX24_AWAKE - IRQ __vector_SCNT_CMP1 - IRQ __vector_SCNT_CMP2 - IRQ __vector_SCNT_CMP3 - IRQ __vector_SCNT_OVFL - IRQ __vector_SCNT_BACKOFF - IRQ __vector_AES_READY - IRQ __vector_BAT_LOW - IRQ __vector_TRX24_TX_START - IRQ __vector_TRX24_AMI0 - IRQ __vector_TRX24_AMI1 - IRQ __vector_TRX24_AMI2 - IRQ __vector_TRX24_AMI3 diff --git a/device/avr/atmega645.go b/device/avr/atmega645.go index cf07a54..110926c 100644 --- a/device/avr/atmega645.go +++ b/device/avr/atmega645.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -48,8 +48,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega645.ld b/device/avr/atmega645.ld deleted file mode 100644 index a6fe048..0000000 --- a/device/avr/atmega645.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega645.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 22; diff --git a/device/avr/atmega645.s b/device/avr/atmega645.s deleted file mode 100644 index 0a3b2d3..0000000 --- a/device/avr/atmega645.s +++ /dev/null @@ -1,68 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega645.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega6450.go b/device/avr/atmega6450.go index 7354730..d56360e 100644 --- a/device/avr/atmega6450.go +++ b/device/avr/atmega6450.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega6450.ld b/device/avr/atmega6450.ld deleted file mode 100644 index 8197ca7..0000000 --- a/device/avr/atmega6450.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega6450.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 25; diff --git a/device/avr/atmega6450.s b/device/avr/atmega6450.s deleted file mode 100644 index 5549aa9..0000000 --- a/device/avr/atmega6450.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega6450.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_NOT_USED - jmp __vector_PCINT2 - jmp __vector_PCINT3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_NOT_USED - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 diff --git a/device/avr/atmega6450a.go b/device/avr/atmega6450a.go index 4b3e75b..1877d72 100644 --- a/device/avr/atmega6450a.go +++ b/device/avr/atmega6450a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega6450a.ld b/device/avr/atmega6450a.ld deleted file mode 100644 index a25bfa0..0000000 --- a/device/avr/atmega6450a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega6450A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 25; diff --git a/device/avr/atmega6450a.s b/device/avr/atmega6450a.s deleted file mode 100644 index 7bcc6f7..0000000 --- a/device/avr/atmega6450a.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega6450A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_NOT_USED - jmp __vector_PCINT2 - jmp __vector_PCINT3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_NOT_USED - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 diff --git a/device/avr/atmega6450p.go b/device/avr/atmega6450p.go index b15e7cc..d8d8223 100644 --- a/device/avr/atmega6450p.go +++ b/device/avr/atmega6450p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega6450p.ld b/device/avr/atmega6450p.ld deleted file mode 100644 index 14724cb..0000000 --- a/device/avr/atmega6450p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega6450P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 25; diff --git a/device/avr/atmega6450p.s b/device/avr/atmega6450p.s deleted file mode 100644 index 1029eb6..0000000 --- a/device/avr/atmega6450p.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega6450P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_NOT_USED - jmp __vector_PCINT2 - jmp __vector_PCINT3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_NOT_USED - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 diff --git a/device/avr/atmega645a.go b/device/avr/atmega645a.go index e6df398..8a77b09 100644 --- a/device/avr/atmega645a.go +++ b/device/avr/atmega645a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -48,8 +48,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega645a.ld b/device/avr/atmega645a.ld deleted file mode 100644 index 40c384f..0000000 --- a/device/avr/atmega645a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega645A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 22; diff --git a/device/avr/atmega645a.s b/device/avr/atmega645a.s deleted file mode 100644 index ee9dee8..0000000 --- a/device/avr/atmega645a.s +++ /dev/null @@ -1,68 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega645A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega645p.go b/device/avr/atmega645p.go index 73bba70..831cbd7 100644 --- a/device/avr/atmega645p.go +++ b/device/avr/atmega645p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -48,8 +48,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega645p.ld b/device/avr/atmega645p.ld deleted file mode 100644 index 06f7874..0000000 --- a/device/avr/atmega645p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega645P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 22; diff --git a/device/avr/atmega645p.s b/device/avr/atmega645p.s deleted file mode 100644 index 4a4b906..0000000 --- a/device/avr/atmega645p.s +++ /dev/null @@ -1,68 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega645P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega649.go b/device/avr/atmega649.go index e118fe7..c7be638 100644 --- a/device/avr/atmega649.go +++ b/device/avr/atmega649.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -49,8 +49,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega649.ld b/device/avr/atmega649.ld deleted file mode 100644 index 72be6a6..0000000 --- a/device/avr/atmega649.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega649.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 23; diff --git a/device/avr/atmega649.s b/device/avr/atmega649.s deleted file mode 100644 index 05c9c64..0000000 --- a/device/avr/atmega649.s +++ /dev/null @@ -1,70 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega649.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD diff --git a/device/avr/atmega6490.go b/device/avr/atmega6490.go index b24f52e..df56ff4 100644 --- a/device/avr/atmega6490.go +++ b/device/avr/atmega6490.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega6490.ld b/device/avr/atmega6490.ld deleted file mode 100644 index bd77e7a..0000000 --- a/device/avr/atmega6490.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega6490.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 25; diff --git a/device/avr/atmega6490.s b/device/avr/atmega6490.s deleted file mode 100644 index 8a8e127..0000000 --- a/device/avr/atmega6490.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega6490.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - jmp __vector_PCINT2 - jmp __vector_PCINT3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 diff --git a/device/avr/atmega6490a.go b/device/avr/atmega6490a.go index 1bdf5b5..10086b0 100644 --- a/device/avr/atmega6490a.go +++ b/device/avr/atmega6490a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega6490a.ld b/device/avr/atmega6490a.ld deleted file mode 100644 index ffe02ed..0000000 --- a/device/avr/atmega6490a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega6490A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 25; diff --git a/device/avr/atmega6490a.s b/device/avr/atmega6490a.s deleted file mode 100644 index a9df972..0000000 --- a/device/avr/atmega6490a.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega6490A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - jmp __vector_PCINT2 - jmp __vector_PCINT3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 diff --git a/device/avr/atmega6490p.go b/device/avr/atmega6490p.go index ce2dcf2..b44f360 100644 --- a/device/avr/atmega6490p.go +++ b/device/avr/atmega6490p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega6490p.ld b/device/avr/atmega6490p.ld deleted file mode 100644 index 34f9d04..0000000 --- a/device/avr/atmega6490p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega6490P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 25; diff --git a/device/avr/atmega6490p.s b/device/avr/atmega6490p.s deleted file mode 100644 index deaa3d6..0000000 --- a/device/avr/atmega6490p.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega6490P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART_RX - jmp __vector_USART_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - jmp __vector_PCINT2 - jmp __vector_PCINT3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 diff --git a/device/avr/atmega649a.go b/device/avr/atmega649a.go index 266d4aa..ec86689 100644 --- a/device/avr/atmega649a.go +++ b/device/avr/atmega649a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -49,8 +49,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega649a.ld b/device/avr/atmega649a.ld deleted file mode 100644 index eb715e4..0000000 --- a/device/avr/atmega649a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega649A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 23; diff --git a/device/avr/atmega649a.s b/device/avr/atmega649a.s deleted file mode 100644 index 478b4f3..0000000 --- a/device/avr/atmega649a.s +++ /dev/null @@ -1,70 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega649A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD diff --git a/device/avr/atmega649p.go b/device/avr/atmega649p.go index c8f0ff4..fd33f92 100644 --- a/device/avr/atmega649p.go +++ b/device/avr/atmega649p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -49,8 +49,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega649p.ld b/device/avr/atmega649p.ld deleted file mode 100644 index e73604e..0000000 --- a/device/avr/atmega649p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega649P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 23; diff --git a/device/avr/atmega649p.s b/device/avr/atmega649p.s deleted file mode 100644 index 1c5cc85..0000000 --- a/device/avr/atmega649p.s +++ /dev/null @@ -1,70 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega649P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_SPM_READY - jmp __vector_LCD - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_SPM_READY - IRQ __vector_LCD diff --git a/device/avr/atmega64a.go b/device/avr/atmega64a.go index 4a5c5a3..0e02406 100644 --- a/device/avr/atmega64a.go +++ b/device/avr/atmega64a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -61,8 +61,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega64a.ld b/device/avr/atmega64a.ld deleted file mode 100644 index 72f7808..0000000 --- a/device/avr/atmega64a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega64A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 35; diff --git a/device/avr/atmega64a.s b/device/avr/atmega64a.s deleted file mode 100644 index 214096f..0000000 --- a/device/avr/atmega64a.s +++ /dev/null @@ -1,94 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega64A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_TIMER2_COMP - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMP - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_ANALOG_COMP - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMP - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY diff --git a/device/avr/atmega64c1.go b/device/avr/atmega64c1.go index 1185b8d..d8cd558 100644 --- a/device/avr/atmega64c1.go +++ b/device/avr/atmega64c1.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega64c1.ld b/device/avr/atmega64c1.ld deleted file mode 100644 index 4f7c3bb..0000000 --- a/device/avr/atmega64c1.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega64C1.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 31; diff --git a/device/avr/atmega64c1.s b/device/avr/atmega64c1.s deleted file mode 100644 index 6126bec..0000000 --- a/device/avr/atmega64c1.s +++ /dev/null @@ -1,86 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega64C1.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_ANACOMP0 - jmp __vector_ANACOMP1 - jmp __vector_ANACOMP2 - jmp __vector_ANACOMP3 - jmp __vector_PSC_FAULT - jmp __vector_PSC_EC - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_CAN_INT - jmp __vector_CAN_TOVF - jmp __vector_LIN_TC - jmp __vector_LIN_ERR - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_SPI_STC - jmp __vector_ADC - jmp __vector_WDT - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_ANACOMP0 - IRQ __vector_ANACOMP1 - IRQ __vector_ANACOMP2 - IRQ __vector_ANACOMP3 - IRQ __vector_PSC_FAULT - IRQ __vector_PSC_EC - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_CAN_INT - IRQ __vector_CAN_TOVF - IRQ __vector_LIN_TC - IRQ __vector_LIN_ERR - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_SPI_STC - IRQ __vector_ADC - IRQ __vector_WDT - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega64hve2.go b/device/avr/atmega64hve2.go index 70c4fd4..a8e83e2 100644 --- a/device/avr/atmega64hve2.go +++ b/device/avr/atmega64hve2.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -51,8 +51,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega64hve2.ld b/device/avr/atmega64hve2.ld deleted file mode 100644 index b573f68..0000000 --- a/device/avr/atmega64hve2.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega64HVE2.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 25; diff --git a/device/avr/atmega64hve2.s b/device/avr/atmega64hve2.s deleted file mode 100644 index b59bdd0..0000000 --- a/device/avr/atmega64hve2.s +++ /dev/null @@ -1,74 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega64HVE2.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_WDT - jmp __vector_WAKEUP - jmp __vector_TIMER1_IC - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_IC - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_LIN_STATUS - jmp __vector_LIN_ERROR - jmp __vector_SPI_STC - jmp __vector_VADC_CONV - jmp __vector_VADC_ACC - jmp __vector_CADC_CONV - jmp __vector_CADC_REG_CUR - jmp __vector_CADC_ACC - jmp __vector_EE_READY - jmp __vector_SPM - jmp __vector_PLL - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_WAKEUP - IRQ __vector_TIMER1_IC - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_IC - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_LIN_STATUS - IRQ __vector_LIN_ERROR - IRQ __vector_SPI_STC - IRQ __vector_VADC_CONV - IRQ __vector_VADC_ACC - IRQ __vector_CADC_CONV - IRQ __vector_CADC_REG_CUR - IRQ __vector_CADC_ACC - IRQ __vector_EE_READY - IRQ __vector_SPM - IRQ __vector_PLL diff --git a/device/avr/atmega64m1.go b/device/avr/atmega64m1.go index 19daa6d..51c90de 100644 --- a/device/avr/atmega64m1.go +++ b/device/avr/atmega64m1.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega64m1.ld b/device/avr/atmega64m1.ld deleted file mode 100644 index c51c5ff..0000000 --- a/device/avr/atmega64m1.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega64M1.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x100; -__ram_size = 0x1000; -__num_isrs = 31; diff --git a/device/avr/atmega64m1.s b/device/avr/atmega64m1.s deleted file mode 100644 index 540f208..0000000 --- a/device/avr/atmega64m1.s +++ /dev/null @@ -1,86 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega64M1.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_ANACOMP0 - jmp __vector_ANACOMP1 - jmp __vector_ANACOMP2 - jmp __vector_ANACOMP3 - jmp __vector_PSC_FAULT - jmp __vector_PSC_EC - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_CAN_INT - jmp __vector_CAN_TOVF - jmp __vector_LIN_TC - jmp __vector_LIN_ERR - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_PCINT3 - jmp __vector_SPI_STC - jmp __vector_ADC - jmp __vector_WDT - jmp __vector_EE_READY - jmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_ANACOMP0 - IRQ __vector_ANACOMP1 - IRQ __vector_ANACOMP2 - IRQ __vector_ANACOMP3 - IRQ __vector_PSC_FAULT - IRQ __vector_PSC_EC - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_CAN_INT - IRQ __vector_CAN_TOVF - IRQ __vector_LIN_TC - IRQ __vector_LIN_ERR - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_SPI_STC - IRQ __vector_ADC - IRQ __vector_WDT - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/atmega64rfr2.go b/device/avr/atmega64rfr2.go index 9c57545..0a8a8b9 100644 --- a/device/avr/atmega64rfr2.go +++ b/device/avr/atmega64rfr2.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega64rfr2.ld b/device/avr/atmega64rfr2.ld deleted file mode 100644 index cccff8f..0000000 --- a/device/avr/atmega64rfr2.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega64RFR2.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x10000; -__ram_start = 0x200; -__ram_size = 0x2000; -__num_isrs = 71; diff --git a/device/avr/atmega64rfr2.s b/device/avr/atmega64rfr2.s deleted file mode 100644 index 395583f..0000000 --- a/device/avr/atmega64rfr2.s +++ /dev/null @@ -1,172 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega64RFR2.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_INT2 - jmp __vector_INT3 - jmp __vector_INT4 - jmp __vector_INT5 - jmp __vector_INT6 - jmp __vector_INT7 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER2_COMPA - jmp __vector_TIMER2_COMPB - jmp __vector_TIMER2_OVF - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_COMPC - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_SPI_STC - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_ANALOG_COMP - jmp __vector_ADC - jmp __vector_EE_READY - jmp __vector_TIMER3_CAPT - jmp __vector_TIMER3_COMPA - jmp __vector_TIMER3_COMPB - jmp __vector_TIMER3_COMPC - jmp __vector_TIMER3_OVF - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_TWI - jmp __vector_SPM_READY - jmp __vector_TIMER4_CAPT - jmp __vector_TIMER4_COMPA - jmp __vector_TIMER4_COMPB - jmp __vector_TIMER4_COMPC - jmp __vector_TIMER4_OVF - jmp __vector_TIMER5_CAPT - jmp __vector_TIMER5_COMPA - jmp __vector_TIMER5_COMPB - jmp __vector_TIMER5_COMPC - jmp __vector_TIMER5_OVF - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_default - jmp __vector_TRX24_PLL_LOCK - jmp __vector_TRX24_PLL_UNLOCK - jmp __vector_TRX24_RX_START - jmp __vector_TRX24_RX_END - jmp __vector_TRX24_CCA_ED_DONE - jmp __vector_TRX24_XAH_AMI - jmp __vector_TRX24_TX_END - jmp __vector_TRX24_AWAKE - jmp __vector_SCNT_CMP1 - jmp __vector_SCNT_CMP2 - jmp __vector_SCNT_CMP3 - jmp __vector_SCNT_OVFL - jmp __vector_SCNT_BACKOFF - jmp __vector_AES_READY - jmp __vector_BAT_LOW - jmp __vector_TRX24_TX_START - jmp __vector_TRX24_AMI0 - jmp __vector_TRX24_AMI1 - jmp __vector_TRX24_AMI2 - jmp __vector_TRX24_AMI3 - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_COMPC - IRQ __vector_TIMER3_OVF - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI - IRQ __vector_SPM_READY - IRQ __vector_TIMER4_CAPT - IRQ __vector_TIMER4_COMPA - IRQ __vector_TIMER4_COMPB - IRQ __vector_TIMER4_COMPC - IRQ __vector_TIMER4_OVF - IRQ __vector_TIMER5_CAPT - IRQ __vector_TIMER5_COMPA - IRQ __vector_TIMER5_COMPB - IRQ __vector_TIMER5_COMPC - IRQ __vector_TIMER5_OVF - IRQ __vector_TRX24_PLL_LOCK - IRQ __vector_TRX24_PLL_UNLOCK - IRQ __vector_TRX24_RX_START - IRQ __vector_TRX24_RX_END - IRQ __vector_TRX24_CCA_ED_DONE - IRQ __vector_TRX24_XAH_AMI - IRQ __vector_TRX24_TX_END - IRQ __vector_TRX24_AWAKE - IRQ __vector_SCNT_CMP1 - IRQ __vector_SCNT_CMP2 - IRQ __vector_SCNT_CMP3 - IRQ __vector_SCNT_OVFL - IRQ __vector_SCNT_BACKOFF - IRQ __vector_AES_READY - IRQ __vector_BAT_LOW - IRQ __vector_TRX24_TX_START - IRQ __vector_TRX24_AMI0 - IRQ __vector_TRX24_AMI1 - IRQ __vector_TRX24_AMI2 - IRQ __vector_TRX24_AMI3 diff --git a/device/avr/atmega8.go b/device/avr/atmega8.go index 644f0c2..2acc6d0 100644 --- a/device/avr/atmega8.go +++ b/device/avr/atmega8.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -45,8 +45,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega8.ld b/device/avr/atmega8.ld deleted file mode 100644 index 1514373..0000000 --- a/device/avr/atmega8.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega8.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x60; -__ram_size = 0x400; -__num_isrs = 19; diff --git a/device/avr/atmega8.s b/device/avr/atmega8.s deleted file mode 100644 index cfada70..0000000 --- a/device/avr/atmega8.s +++ /dev/null @@ -1,62 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega8.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_TIMER2_COMP - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_RXC - rjmp __vector_USART_UDRE - rjmp __vector_USART_TXC - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_TWI - rjmp __vector_SPM_RDY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RXC - IRQ __vector_USART_UDRE - IRQ __vector_USART_TXC - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_TWI - IRQ __vector_SPM_RDY diff --git a/device/avr/atmega8515.go b/device/avr/atmega8515.go index b908337..3cf5fa1 100644 --- a/device/avr/atmega8515.go +++ b/device/avr/atmega8515.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -43,8 +43,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega8515.ld b/device/avr/atmega8515.ld deleted file mode 100644 index 95f3846..0000000 --- a/device/avr/atmega8515.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega8515.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x60; -__ram_size = 0x200; -__num_isrs = 17; diff --git a/device/avr/atmega8515.s b/device/avr/atmega8515.s deleted file mode 100644 index b9e4565..0000000 --- a/device/avr/atmega8515.s +++ /dev/null @@ -1,58 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega8515.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ANA_COMP - rjmp __vector_INT2 - rjmp __vector_TIMER0_COMP - rjmp __vector_EE_RDY - rjmp __vector_SPM_RDY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ANA_COMP - IRQ __vector_INT2 - IRQ __vector_TIMER0_COMP - IRQ __vector_EE_RDY - IRQ __vector_SPM_RDY diff --git a/device/avr/atmega8535.go b/device/avr/atmega8535.go index 8dc6dd9..0d5e846 100644 --- a/device/avr/atmega8535.go +++ b/device/avr/atmega8535.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -47,8 +47,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega8535.ld b/device/avr/atmega8535.ld deleted file mode 100644 index 447e05d..0000000 --- a/device/avr/atmega8535.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega8535.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x60; -__ram_size = 0x200; -__num_isrs = 21; diff --git a/device/avr/atmega8535.s b/device/avr/atmega8535.s deleted file mode 100644 index 172f979..0000000 --- a/device/avr/atmega8535.s +++ /dev/null @@ -1,66 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega8535.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_TIMER2_COMP - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_TWI - rjmp __vector_INT2 - rjmp __vector_TIMER0_COMP - rjmp __vector_SPM_RDY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_TWI - IRQ __vector_INT2 - IRQ __vector_TIMER0_COMP - IRQ __vector_SPM_RDY diff --git a/device/avr/atmega88.go b/device/avr/atmega88.go index ac8d44a..e027d05 100644 --- a/device/avr/atmega88.go +++ b/device/avr/atmega88.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega88.ld b/device/avr/atmega88.ld deleted file mode 100644 index 2a847b6..0000000 --- a/device/avr/atmega88.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega88.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 26; diff --git a/device/avr/atmega88.s b/device/avr/atmega88.s deleted file mode 100644 index 79f799b..0000000 --- a/device/avr/atmega88.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega88.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_WDT - rjmp __vector_TIMER2_COMPA - rjmp __vector_TIMER2_COMPB - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ADC - rjmp __vector_EE_READY - rjmp __vector_ANALOG_COMP - rjmp __vector_TWI - rjmp __vector_SPM_Ready - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready diff --git a/device/avr/atmega88a.go b/device/avr/atmega88a.go index 00ef7ff..ad3b3e8 100644 --- a/device/avr/atmega88a.go +++ b/device/avr/atmega88a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega88a.ld b/device/avr/atmega88a.ld deleted file mode 100644 index e1bb2f2..0000000 --- a/device/avr/atmega88a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega88A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 26; diff --git a/device/avr/atmega88a.s b/device/avr/atmega88a.s deleted file mode 100644 index 8cc42a0..0000000 --- a/device/avr/atmega88a.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega88A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_WDT - rjmp __vector_TIMER2_COMPA - rjmp __vector_TIMER2_COMPB - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ADC - rjmp __vector_EE_READY - rjmp __vector_ANALOG_COMP - rjmp __vector_TWI - rjmp __vector_SPM_Ready - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready diff --git a/device/avr/atmega88p.go b/device/avr/atmega88p.go index cec86c0..6b8ff15 100644 --- a/device/avr/atmega88p.go +++ b/device/avr/atmega88p.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega88p.ld b/device/avr/atmega88p.ld deleted file mode 100644 index c61efa3..0000000 --- a/device/avr/atmega88p.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega88P.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 26; diff --git a/device/avr/atmega88p.s b/device/avr/atmega88p.s deleted file mode 100644 index 1465cb4..0000000 --- a/device/avr/atmega88p.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega88P.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_WDT - rjmp __vector_TIMER2_COMPA - rjmp __vector_TIMER2_COMPB - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ADC - rjmp __vector_EE_READY - rjmp __vector_ANALOG_COMP - rjmp __vector_TWI - rjmp __vector_SPM_Ready - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready diff --git a/device/avr/atmega88pa.go b/device/avr/atmega88pa.go index 1137cba..fd4a958 100644 --- a/device/avr/atmega88pa.go +++ b/device/avr/atmega88pa.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega88pa.ld b/device/avr/atmega88pa.ld deleted file mode 100644 index d0df3ab..0000000 --- a/device/avr/atmega88pa.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega88PA.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 26; diff --git a/device/avr/atmega88pa.s b/device/avr/atmega88pa.s deleted file mode 100644 index 01e1e53..0000000 --- a/device/avr/atmega88pa.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega88PA.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_WDT - rjmp __vector_TIMER2_COMPA - rjmp __vector_TIMER2_COMPB - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ADC - rjmp __vector_EE_READY - rjmp __vector_ANALOG_COMP - rjmp __vector_TWI - rjmp __vector_SPM_Ready - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready diff --git a/device/avr/atmega88pb.go b/device/avr/atmega88pb.go index 0028c98..be5e83f 100644 --- a/device/avr/atmega88pb.go +++ b/device/avr/atmega88pb.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -53,8 +53,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega88pb.ld b/device/avr/atmega88pb.ld deleted file mode 100644 index e69ed26..0000000 --- a/device/avr/atmega88pb.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega88PB.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 27; diff --git a/device/avr/atmega88pb.s b/device/avr/atmega88pb.s deleted file mode 100644 index 8541064..0000000 --- a/device/avr/atmega88pb.s +++ /dev/null @@ -1,78 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega88PB.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_WDT - rjmp __vector_TIMER2_COMPA - rjmp __vector_TIMER2_COMPB - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ADC - rjmp __vector_EE_READY - rjmp __vector_ANALOG_COMP - rjmp __vector_TWI - rjmp __vector_SPM_Ready - rjmp __vector_USART_START - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI - IRQ __vector_SPM_Ready - IRQ __vector_USART_START diff --git a/device/avr/atmega8a.go b/device/avr/atmega8a.go index 6c8b47b..63a169f 100644 --- a/device/avr/atmega8a.go +++ b/device/avr/atmega8a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -45,8 +45,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega8a.ld b/device/avr/atmega8a.ld deleted file mode 100644 index 8f9249e..0000000 --- a/device/avr/atmega8a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega8A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x60; -__ram_size = 0x400; -__num_isrs = 19; diff --git a/device/avr/atmega8a.s b/device/avr/atmega8a.s deleted file mode 100644 index 3fee054..0000000 --- a/device/avr/atmega8a.s +++ /dev/null @@ -1,62 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega8A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_TIMER2_COMP - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_RXC - rjmp __vector_USART_UDRE - rjmp __vector_USART_TXC - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_TWI - rjmp __vector_SPM_RDY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_TIMER2_COMP - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_RXC - IRQ __vector_USART_UDRE - IRQ __vector_USART_TXC - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_TWI - IRQ __vector_SPM_RDY diff --git a/device/avr/atmega8hva.go b/device/avr/atmega8hva.go index 572256c..25cd2e4 100644 --- a/device/avr/atmega8hva.go +++ b/device/avr/atmega8hva.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -47,8 +47,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega8hva.ld b/device/avr/atmega8hva.ld deleted file mode 100644 index 907d598..0000000 --- a/device/avr/atmega8hva.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega8HVA.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 21; diff --git a/device/avr/atmega8hva.s b/device/avr/atmega8hva.s deleted file mode 100644 index 5dabeb3..0000000 --- a/device/avr/atmega8hva.s +++ /dev/null @@ -1,66 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega8HVA.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_BPINT - rjmp __vector_VREGMON - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_INT2 - rjmp __vector_WDT - rjmp __vector_TIMER1_IC - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_IC - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_VADC - rjmp __vector_CCADC_CONV - rjmp __vector_CCADC_REG_CUR - rjmp __vector_CCADC_ACC - rjmp __vector_EE_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_BPINT - IRQ __vector_VREGMON - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_WDT - IRQ __vector_TIMER1_IC - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_IC - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_VADC - IRQ __vector_CCADC_CONV - IRQ __vector_CCADC_REG_CUR - IRQ __vector_CCADC_ACC - IRQ __vector_EE_READY diff --git a/device/avr/atmega8u2.go b/device/avr/atmega8u2.go index 744c2fc..fe8ecad 100644 --- a/device/avr/atmega8u2.go +++ b/device/avr/atmega8u2.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -55,8 +55,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/atmega8u2.ld b/device/avr/atmega8u2.ld deleted file mode 100644 index b9447a3..0000000 --- a/device/avr/atmega8u2.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATmega8U2.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 29; diff --git a/device/avr/atmega8u2.s b/device/avr/atmega8u2.s deleted file mode 100644 index 6d93f7c..0000000 --- a/device/avr/atmega8u2.s +++ /dev/null @@ -1,82 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATmega8U2.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_INT2 - rjmp __vector_INT3 - rjmp __vector_INT4 - rjmp __vector_INT5 - rjmp __vector_INT6 - rjmp __vector_INT7 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_USB_GEN - rjmp __vector_USB_COM - rjmp __vector_WDT - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_COMPC - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART1_RX - rjmp __vector_USART1_UDRE - rjmp __vector_USART1_TX - rjmp __vector_ANALOG_COMP - rjmp __vector_EE_READY - rjmp __vector_SPM_READY - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_INT2 - IRQ __vector_INT3 - IRQ __vector_INT4 - IRQ __vector_INT5 - IRQ __vector_INT6 - IRQ __vector_INT7 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_USB_GEN - IRQ __vector_USB_COM - IRQ __vector_WDT - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_COMPC - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_ANALOG_COMP - IRQ __vector_EE_READY - IRQ __vector_SPM_READY diff --git a/device/avr/attiny10.go b/device/avr/attiny10.go index a94fb75..974a856 100644 --- a/device/avr/attiny10.go +++ b/device/avr/attiny10.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -37,8 +37,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny10.ld b/device/avr/attiny10.ld deleted file mode 100644 index c0fdcc2..0000000 --- a/device/avr/attiny10.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny10.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x400; -__mapped_flash_start = 0x4000; -__ram_start = 0x40; -__ram_size = 0x20; -__num_isrs = 11; diff --git a/device/avr/attiny10.s b/device/avr/attiny10.s deleted file mode 100644 index 0cc31aa..0000000 --- a/device/avr/attiny10.s +++ /dev/null @@ -1,46 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny10.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_TIM0_CAPT - rjmp __vector_TIM0_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_ANA_COMP - rjmp __vector_WDT - rjmp __vector_VLM - rjmp __vector_ADC - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_TIM0_CAPT - IRQ __vector_TIM0_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_ANA_COMP - IRQ __vector_WDT - IRQ __vector_VLM - IRQ __vector_ADC diff --git a/device/avr/attiny102.go b/device/avr/attiny102.go index b827ee2..a940658 100644 --- a/device/avr/attiny102.go +++ b/device/avr/attiny102.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -42,8 +42,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny102.ld b/device/avr/attiny102.ld deleted file mode 100644 index 2c6c2b6..0000000 --- a/device/avr/attiny102.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny102.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x400; -__mapped_flash_start = 0x4000; -__ram_start = 0x40; -__ram_size = 0x20; -__num_isrs = 16; diff --git a/device/avr/attiny102.s b/device/avr/attiny102.s deleted file mode 100644 index b72522b..0000000 --- a/device/avr/attiny102.s +++ /dev/null @@ -1,56 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny102.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_TIM0_CAPT - rjmp __vector_TIM0_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_ANA_COMP - rjmp __vector_WDT - rjmp __vector_VLM - rjmp __vector_ADC - rjmp __vector_USART_RXS - rjmp __vector_USART_RXC - rjmp __vector_USART_DRE - rjmp __vector_USART_TXC - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIM0_CAPT - IRQ __vector_TIM0_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_ANA_COMP - IRQ __vector_WDT - IRQ __vector_VLM - IRQ __vector_ADC - IRQ __vector_USART_RXS - IRQ __vector_USART_RXC - IRQ __vector_USART_DRE - IRQ __vector_USART_TXC diff --git a/device/avr/attiny104.go b/device/avr/attiny104.go index 2c9ed1d..413890f 100644 --- a/device/avr/attiny104.go +++ b/device/avr/attiny104.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -42,8 +42,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny104.ld b/device/avr/attiny104.ld deleted file mode 100644 index 0842fb5..0000000 --- a/device/avr/attiny104.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny104.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x400; -__mapped_flash_start = 0x4000; -__ram_start = 0x40; -__ram_size = 0x20; -__num_isrs = 16; diff --git a/device/avr/attiny104.s b/device/avr/attiny104.s deleted file mode 100644 index 298cb43..0000000 --- a/device/avr/attiny104.s +++ /dev/null @@ -1,56 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny104.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_TIM0_CAPT - rjmp __vector_TIM0_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_ANA_COMP - rjmp __vector_WDT - rjmp __vector_VLM - rjmp __vector_ADC - rjmp __vector_USART_RXS - rjmp __vector_USART_RXC - rjmp __vector_USART_DRE - rjmp __vector_USART_TXC - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_TIM0_CAPT - IRQ __vector_TIM0_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_ANA_COMP - IRQ __vector_WDT - IRQ __vector_VLM - IRQ __vector_ADC - IRQ __vector_USART_RXS - IRQ __vector_USART_RXC - IRQ __vector_USART_DRE - IRQ __vector_USART_TXC diff --git a/device/avr/attiny11.go b/device/avr/attiny11.go index 7cfdd66..658c9f3 100644 --- a/device/avr/attiny11.go +++ b/device/avr/attiny11.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -31,8 +31,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny11.ld b/device/avr/attiny11.ld deleted file mode 100644 index 02daa69..0000000 --- a/device/avr/attiny11.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny11.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x400; -__ram_start = 0x0; -__ram_size = 0x0; -__num_isrs = 5; diff --git a/device/avr/attiny11.s b/device/avr/attiny11.s deleted file mode 100644 index cbe5eb1..0000000 --- a/device/avr/attiny11.s +++ /dev/null @@ -1,34 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny11.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_IO_PINS - rjmp __vector_TIMER0_OVF - rjmp __vector_ANA_COMP - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_IO_PINS - IRQ __vector_TIMER0_OVF - IRQ __vector_ANA_COMP diff --git a/device/avr/attiny12.go b/device/avr/attiny12.go index 937e198..b95755e 100644 --- a/device/avr/attiny12.go +++ b/device/avr/attiny12.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -32,8 +32,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny12.ld b/device/avr/attiny12.ld deleted file mode 100644 index 8d29821..0000000 --- a/device/avr/attiny12.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny12.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x400; -__ram_start = 0x0; -__ram_size = 0x0; -__num_isrs = 6; diff --git a/device/avr/attiny12.s b/device/avr/attiny12.s deleted file mode 100644 index bf8aa98..0000000 --- a/device/avr/attiny12.s +++ /dev/null @@ -1,36 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny12.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_IO_PINS - rjmp __vector_TIMER0_OVF - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_IO_PINS - IRQ __vector_TIMER0_OVF - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP diff --git a/device/avr/attiny13.go b/device/avr/attiny13.go index bcf3e4a..4ab5605 100644 --- a/device/avr/attiny13.go +++ b/device/avr/attiny13.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -36,8 +36,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny13.ld b/device/avr/attiny13.ld deleted file mode 100644 index b77e67b..0000000 --- a/device/avr/attiny13.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny13.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x400; -__ram_start = 0x60; -__ram_size = 0x40; -__num_isrs = 10; diff --git a/device/avr/attiny13.s b/device/avr/attiny13.s deleted file mode 100644 index d3262d5..0000000 --- a/device/avr/attiny13.s +++ /dev/null @@ -1,44 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny13.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_TIM0_OVF - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_WDT - rjmp __vector_ADC - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_TIM0_OVF - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_WDT - IRQ __vector_ADC diff --git a/device/avr/attiny13a.go b/device/avr/attiny13a.go index f8fa1ca..b32fe72 100644 --- a/device/avr/attiny13a.go +++ b/device/avr/attiny13a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -36,8 +36,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny13a.ld b/device/avr/attiny13a.ld deleted file mode 100644 index 214b252..0000000 --- a/device/avr/attiny13a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny13A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x400; -__ram_start = 0x60; -__ram_size = 0x40; -__num_isrs = 10; diff --git a/device/avr/attiny13a.s b/device/avr/attiny13a.s deleted file mode 100644 index 34e4773..0000000 --- a/device/avr/attiny13a.s +++ /dev/null @@ -1,44 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny13A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_TIM0_OVF - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_WDT - rjmp __vector_ADC - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_TIM0_OVF - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_WDT - IRQ __vector_ADC diff --git a/device/avr/attiny15.go b/device/avr/attiny15.go index f1a9636..87e7318 100644 --- a/device/avr/attiny15.go +++ b/device/avr/attiny15.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -35,8 +35,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny15.ld b/device/avr/attiny15.ld deleted file mode 100644 index f268d84..0000000 --- a/device/avr/attiny15.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny15.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x400; -__ram_start = 0x0; -__ram_size = 0x0; -__num_isrs = 9; diff --git a/device/avr/attiny15.s b/device/avr/attiny15.s deleted file mode 100644 index 77dd251..0000000 --- a/device/avr/attiny15.s +++ /dev/null @@ -1,42 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny15.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_IO_PINS - rjmp __vector_TIMER1_COMP - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_ADC - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_IO_PINS - IRQ __vector_TIMER1_COMP - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_ADC diff --git a/device/avr/attiny1614.go b/device/avr/attiny1614.go index 432be17..50cc257 100644 --- a/device/avr/attiny1614.go +++ b/device/avr/attiny1614.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -61,8 +61,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny1614.ld b/device/avr/attiny1614.ld deleted file mode 100644 index fd9441e..0000000 --- a/device/avr/attiny1614.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny1614.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__mapped_flash_start = 0x8000; -__ram_start = 0x3800; -__ram_size = 0x800; -__num_isrs = 34; diff --git a/device/avr/attiny1614.s b/device/avr/attiny1614.s deleted file mode 100644 index 7ec7a47..0000000 --- a/device/avr/attiny1614.s +++ /dev/null @@ -1,90 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny1614.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_CRCSCAN_NMI - jmp __vector_BOD_VLM - jmp __vector_PORTA_PORT - jmp __vector_PORTB_PORT - jmp __vector_PORTC_PORT - jmp __vector_RTC_CNT - jmp __vector_RTC_PIT - jmp __vector_TCA0_LUNF - jmp __vector_TCA0_HUNF - jmp __vector_TCA0_LCMP0 - jmp __vector_TCA0_CMP1 - jmp __vector_TCA0_CMP2 - jmp __vector_TCB0_INT - jmp __vector_TCB1_INT - jmp __vector_TCD0_OVF - jmp __vector_TCD0_TRIG - jmp __vector_AC0_AC - jmp __vector_AC1_AC - jmp __vector_AC2_AC - jmp __vector_ADC0_RESRDY - jmp __vector_ADC0_WCOMP - jmp __vector_ADC1_RESRDY - jmp __vector_ADC1_WCOMP - jmp __vector_TWI0_TWIS - jmp __vector_TWI0_TWIM - jmp __vector_SPI0_INT - jmp __vector_USART0_RXC - jmp __vector_USART0_DRE - jmp __vector_USART0_TXC - jmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_PORTB_PORT - IRQ __vector_PORTC_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCB1_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_AC1_AC - IRQ __vector_AC2_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_ADC1_RESRDY - IRQ __vector_ADC1_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny1616.go b/device/avr/attiny1616.go index 78b01f7..ae9a9f9 100644 --- a/device/avr/attiny1616.go +++ b/device/avr/attiny1616.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -61,8 +61,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny1616.ld b/device/avr/attiny1616.ld deleted file mode 100644 index 296decc..0000000 --- a/device/avr/attiny1616.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny1616.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__mapped_flash_start = 0x8000; -__ram_start = 0x3800; -__ram_size = 0x800; -__num_isrs = 34; diff --git a/device/avr/attiny1616.s b/device/avr/attiny1616.s deleted file mode 100644 index a044e21..0000000 --- a/device/avr/attiny1616.s +++ /dev/null @@ -1,90 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny1616.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_CRCSCAN_NMI - jmp __vector_BOD_VLM - jmp __vector_PORTA_PORT - jmp __vector_PORTB_PORT - jmp __vector_PORTC_PORT - jmp __vector_RTC_CNT - jmp __vector_RTC_PIT - jmp __vector_TCA0_LUNF - jmp __vector_TCA0_HUNF - jmp __vector_TCA0_LCMP0 - jmp __vector_TCA0_CMP1 - jmp __vector_TCA0_CMP2 - jmp __vector_TCB0_INT - jmp __vector_TCB1_INT - jmp __vector_TCD0_OVF - jmp __vector_TCD0_TRIG - jmp __vector_AC0_AC - jmp __vector_AC1_AC - jmp __vector_AC2_AC - jmp __vector_ADC0_RESRDY - jmp __vector_ADC0_WCOMP - jmp __vector_ADC1_RESRDY - jmp __vector_ADC1_WCOMP - jmp __vector_TWI0_TWIS - jmp __vector_TWI0_TWIM - jmp __vector_SPI0_INT - jmp __vector_USART0_RXC - jmp __vector_USART0_DRE - jmp __vector_USART0_TXC - jmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_PORTB_PORT - IRQ __vector_PORTC_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCB1_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_AC1_AC - IRQ __vector_AC2_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_ADC1_RESRDY - IRQ __vector_ADC1_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny1617.go b/device/avr/attiny1617.go index c97099e..cbbcf03 100644 --- a/device/avr/attiny1617.go +++ b/device/avr/attiny1617.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -61,8 +61,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny1617.ld b/device/avr/attiny1617.ld deleted file mode 100644 index 3f5a2e1..0000000 --- a/device/avr/attiny1617.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny1617.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__mapped_flash_start = 0x8000; -__ram_start = 0x3800; -__ram_size = 0x800; -__num_isrs = 34; diff --git a/device/avr/attiny1617.s b/device/avr/attiny1617.s deleted file mode 100644 index 0e5c470..0000000 --- a/device/avr/attiny1617.s +++ /dev/null @@ -1,90 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny1617.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_CRCSCAN_NMI - jmp __vector_BOD_VLM - jmp __vector_PORTA_PORT - jmp __vector_PORTB_PORT - jmp __vector_PORTC_PORT - jmp __vector_RTC_CNT - jmp __vector_RTC_PIT - jmp __vector_TCA0_LUNF - jmp __vector_TCA0_HUNF - jmp __vector_TCA0_LCMP0 - jmp __vector_TCA0_CMP1 - jmp __vector_TCA0_CMP2 - jmp __vector_TCB0_INT - jmp __vector_TCB1_INT - jmp __vector_TCD0_OVF - jmp __vector_TCD0_TRIG - jmp __vector_AC0_AC - jmp __vector_AC1_AC - jmp __vector_AC2_AC - jmp __vector_ADC0_RESRDY - jmp __vector_ADC0_WCOMP - jmp __vector_ADC1_RESRDY - jmp __vector_ADC1_WCOMP - jmp __vector_TWI0_TWIS - jmp __vector_TWI0_TWIM - jmp __vector_SPI0_INT - jmp __vector_USART0_RXC - jmp __vector_USART0_DRE - jmp __vector_USART0_TXC - jmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_PORTB_PORT - IRQ __vector_PORTC_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCB1_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_AC1_AC - IRQ __vector_AC2_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_ADC1_RESRDY - IRQ __vector_ADC1_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny1634.go b/device/avr/attiny1634.go index 3466af0..3cebada 100644 --- a/device/avr/attiny1634.go +++ b/device/avr/attiny1634.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -73,8 +73,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny1634.ld b/device/avr/attiny1634.ld deleted file mode 100644 index 0b90ca3..0000000 --- a/device/avr/attiny1634.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny1634.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 47; diff --git a/device/avr/attiny1634.s b/device/avr/attiny1634.s deleted file mode 100644 index 747fde3..0000000 --- a/device/avr/attiny1634.s +++ /dev/null @@ -1,99 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny1634.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_PCINT2 - jmp __vector_WDT - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_COMPB - jmp __vector_TIMER0_OVF - jmp __vector_ANA_COMP - jmp __vector_ADC - jmp __vector_USART0_START - jmp __vector_USART0_RX - jmp __vector_USART0_UDRE - jmp __vector_USART0_TX - jmp __vector_USART1_START - jmp __vector_USART1_RX - jmp __vector_USART1_UDRE - jmp __vector_USART1_TX - jmp __vector_USI_START - jmp __vector_USI_OVERFLOW - jmp __vector_TWI_SLAVE - jmp __vector_EE_RDY - jmp __vector_QTRIP - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIM1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIM1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIM1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIM1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIM0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIM0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_TIM0_OVF - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_ADC_READY - IRQ __vector_USART0_START - IRQ __vector_USART0_RXS - IRQ __vector_USART0_RX - IRQ __vector_USART0_RXC - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TX - IRQ __vector_USART0_TXC - IRQ __vector_USART1_START - IRQ __vector_USART1_RXS - IRQ __vector_USART1_RX - IRQ __vector_USART1_RXC - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_DRE - IRQ __vector_USART1_TX - IRQ __vector_USART1_TXC - IRQ __vector_USI_START - IRQ __vector_USI_STR - IRQ __vector_USI_OVERFLOW - IRQ __vector_USI_OVF - IRQ __vector_TWI_SLAVE - IRQ __vector_TWI - IRQ __vector_EE_RDY - IRQ __vector_QTRIP diff --git a/device/avr/attiny167.go b/device/avr/attiny167.go index 0b54096..36204dd 100644 --- a/device/avr/attiny167.go +++ b/device/avr/attiny167.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -46,8 +46,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny167.ld b/device/avr/attiny167.ld deleted file mode 100644 index fb114e9..0000000 --- a/device/avr/attiny167.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny167.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x4000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 20; diff --git a/device/avr/attiny167.s b/device/avr/attiny167.s deleted file mode 100644 index c6ae21e..0000000 --- a/device/avr/attiny167.s +++ /dev/null @@ -1,64 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny167.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_INT0 - jmp __vector_INT1 - jmp __vector_PCINT0 - jmp __vector_PCINT1 - jmp __vector_WDT - jmp __vector_TIMER1_CAPT - jmp __vector_TIMER1_COMPA - jmp __vector_TIMER1_COMPB - jmp __vector_TIMER1_OVF - jmp __vector_TIMER0_COMPA - jmp __vector_TIMER0_OVF - jmp __vector_LIN_TC - jmp __vector_LIN_ERR - jmp __vector_SPI_STC - jmp __vector_ADC - jmp __vector_EE_RDY - jmp __vector_ANA_COMP - jmp __vector_USI_START - jmp __vector_USI_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_OVF - IRQ __vector_LIN_TC - IRQ __vector_LIN_ERR - IRQ __vector_SPI_STC - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_USI_START - IRQ __vector_USI_OVF diff --git a/device/avr/attiny20.go b/device/avr/attiny20.go index 50cb95d..a429bd2 100644 --- a/device/avr/attiny20.go +++ b/device/avr/attiny20.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -43,8 +43,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny20.ld b/device/avr/attiny20.ld deleted file mode 100644 index a76ce0a..0000000 --- a/device/avr/attiny20.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny20.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x800; -__mapped_flash_start = 0x4000; -__ram_start = 0x40; -__ram_size = 0x80; -__num_isrs = 17; diff --git a/device/avr/attiny20.s b/device/avr/attiny20.s deleted file mode 100644 index b105d02..0000000 --- a/device/avr/attiny20.s +++ /dev/null @@ -1,58 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny20.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_WDT - rjmp __vector_TIM1_CAPT - rjmp __vector_TIM1_COMPA - rjmp __vector_TIM1_COMPB - rjmp __vector_TIM1_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_TIM0_OVF - rjmp __vector_ANA_COMP - rjmp __vector_ADC_ADC - rjmp __vector_TWI_SLAVE - rjmp __vector_SPI - rjmp __vector_QTRIP - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_TIM1_CAPT - IRQ __vector_TIM1_COMPA - IRQ __vector_TIM1_COMPB - IRQ __vector_TIM1_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_TIM0_OVF - IRQ __vector_ANA_COMP - IRQ __vector_ADC_ADC - IRQ __vector_TWI_SLAVE - IRQ __vector_SPI - IRQ __vector_QTRIP diff --git a/device/avr/attiny212.go b/device/avr/attiny212.go index 44b65c9..8c4c159 100644 --- a/device/avr/attiny212.go +++ b/device/avr/attiny212.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -54,8 +54,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny212.ld b/device/avr/attiny212.ld deleted file mode 100644 index 6c05eb5..0000000 --- a/device/avr/attiny212.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny212.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x800; -__mapped_flash_start = 0x8000; -__ram_start = 0x3f80; -__ram_size = 0x80; -__num_isrs = 27; diff --git a/device/avr/attiny212.s b/device/avr/attiny212.s deleted file mode 100644 index d507643..0000000 --- a/device/avr/attiny212.s +++ /dev/null @@ -1,78 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny212.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_CRCSCAN_NMI - rjmp __vector_BOD_VLM - rjmp __vector_PORTA_PORT - rjmp __vector_default - rjmp __vector_default - rjmp __vector_RTC_CNT - rjmp __vector_RTC_PIT - rjmp __vector_TCA0_LUNF - rjmp __vector_TCA0_HUNF - rjmp __vector_TCA0_LCMP0 - rjmp __vector_TCA0_CMP1 - rjmp __vector_TCA0_CMP2 - rjmp __vector_TCB0_INT - rjmp __vector_TCD0_OVF - rjmp __vector_TCD0_TRIG - rjmp __vector_AC0_AC - rjmp __vector_ADC0_RESRDY - rjmp __vector_ADC0_WCOMP - rjmp __vector_TWI0_TWIS - rjmp __vector_TWI0_TWIM - rjmp __vector_SPI0_INT - rjmp __vector_USART0_RXC - rjmp __vector_USART0_DRE - rjmp __vector_USART0_TXC - rjmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny214.go b/device/avr/attiny214.go index 39ac86f..8551d80 100644 --- a/device/avr/attiny214.go +++ b/device/avr/attiny214.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -55,8 +55,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny214.ld b/device/avr/attiny214.ld deleted file mode 100644 index b9045a9..0000000 --- a/device/avr/attiny214.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny214.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x800; -__mapped_flash_start = 0x8000; -__ram_start = 0x3f80; -__ram_size = 0x80; -__num_isrs = 28; diff --git a/device/avr/attiny214.s b/device/avr/attiny214.s deleted file mode 100644 index 72e5c3b..0000000 --- a/device/avr/attiny214.s +++ /dev/null @@ -1,79 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny214.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_CRCSCAN_NMI - rjmp __vector_BOD_VLM - rjmp __vector_PORTA_PORT - rjmp __vector_PORTB_PORT - rjmp __vector_default - rjmp __vector_RTC_CNT - rjmp __vector_RTC_PIT - rjmp __vector_TCA0_LUNF - rjmp __vector_TCA0_HUNF - rjmp __vector_TCA0_LCMP0 - rjmp __vector_TCA0_CMP1 - rjmp __vector_TCA0_CMP2 - rjmp __vector_TCB0_INT - rjmp __vector_TCD0_OVF - rjmp __vector_TCD0_TRIG - rjmp __vector_AC0_AC - rjmp __vector_ADC0_RESRDY - rjmp __vector_ADC0_WCOMP - rjmp __vector_TWI0_TWIS - rjmp __vector_TWI0_TWIM - rjmp __vector_SPI0_INT - rjmp __vector_USART0_RXC - rjmp __vector_USART0_DRE - rjmp __vector_USART0_TXC - rjmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_PORTB_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny2313.go b/device/avr/attiny2313.go index a176085..f6f4ec3 100644 --- a/device/avr/attiny2313.go +++ b/device/avr/attiny2313.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -45,8 +45,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny2313.ld b/device/avr/attiny2313.ld deleted file mode 100644 index b6e9a53..0000000 --- a/device/avr/attiny2313.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny2313.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x800; -__ram_start = 0x60; -__ram_size = 0x80; -__num_isrs = 19; diff --git a/device/avr/attiny2313.s b/device/avr/attiny2313.s deleted file mode 100644 index 2fa233b..0000000 --- a/device/avr/attiny2313.s +++ /dev/null @@ -1,62 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny2313.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ANA_COMP - rjmp __vector_PCINT - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_USI_START - rjmp __vector_USI_OVERFLOW - rjmp __vector_EEPROM_Ready - rjmp __vector_WDT_OVERFLOW - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ANA_COMP - IRQ __vector_PCINT - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_EEPROM_Ready - IRQ __vector_WDT_OVERFLOW diff --git a/device/avr/attiny2313a.go b/device/avr/attiny2313a.go index 7974882..40076c6 100644 --- a/device/avr/attiny2313a.go +++ b/device/avr/attiny2313a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -47,8 +47,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny2313a.ld b/device/avr/attiny2313a.ld deleted file mode 100644 index 345ae9c..0000000 --- a/device/avr/attiny2313a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny2313A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x800; -__ram_start = 0x60; -__ram_size = 0x80; -__num_isrs = 21; diff --git a/device/avr/attiny2313a.s b/device/avr/attiny2313a.s deleted file mode 100644 index b61172e..0000000 --- a/device/avr/attiny2313a.s +++ /dev/null @@ -1,66 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny2313A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ANA_COMP - rjmp __vector_PCINT_B - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_USI_START - rjmp __vector_USI_OVERFLOW - rjmp __vector_EEPROM_Ready - rjmp __vector_WDT_OVERFLOW - rjmp __vector_PCINT_A - rjmp __vector_PCINT_D - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ANA_COMP - IRQ __vector_PCINT_B - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_EEPROM_Ready - IRQ __vector_WDT_OVERFLOW - IRQ __vector_PCINT_A - IRQ __vector_PCINT_D diff --git a/device/avr/attiny24.go b/device/avr/attiny24.go index e3ed7b9..5fc4b47 100644 --- a/device/avr/attiny24.go +++ b/device/avr/attiny24.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -43,8 +43,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny24.ld b/device/avr/attiny24.ld deleted file mode 100644 index 63b24ef..0000000 --- a/device/avr/attiny24.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny24.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x800; -__ram_start = 0x60; -__ram_size = 0x80; -__num_isrs = 17; diff --git a/device/avr/attiny24.s b/device/avr/attiny24.s deleted file mode 100644 index 9bb2f4b..0000000 --- a/device/avr/attiny24.s +++ /dev/null @@ -1,58 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny24.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_EXT_INT0 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_WDT - rjmp __vector_TIM1_CAPT - rjmp __vector_TIM1_COMPA - rjmp __vector_TIM1_COMPB - rjmp __vector_TIM1_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_TIM0_OVF - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_USI_STR - rjmp __vector_USI_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_EXT_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_TIM1_CAPT - IRQ __vector_TIM1_COMPA - IRQ __vector_TIM1_COMPB - IRQ __vector_TIM1_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_TIM0_OVF - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_USI_STR - IRQ __vector_USI_OVF diff --git a/device/avr/attiny24a.go b/device/avr/attiny24a.go index 5abd791..74395c3 100644 --- a/device/avr/attiny24a.go +++ b/device/avr/attiny24a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -43,8 +43,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny24a.ld b/device/avr/attiny24a.ld deleted file mode 100644 index 0de99de..0000000 --- a/device/avr/attiny24a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny24A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x800; -__ram_start = 0x60; -__ram_size = 0x80; -__num_isrs = 17; diff --git a/device/avr/attiny24a.s b/device/avr/attiny24a.s deleted file mode 100644 index 8c04b87..0000000 --- a/device/avr/attiny24a.s +++ /dev/null @@ -1,58 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny24A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_EXT_INT0 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_WDT - rjmp __vector_TIM1_CAPT - rjmp __vector_TIM1_COMPA - rjmp __vector_TIM1_COMPB - rjmp __vector_TIM1_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_TIM0_OVF - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_USI_STR - rjmp __vector_USI_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_EXT_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_TIM1_CAPT - IRQ __vector_TIM1_COMPA - IRQ __vector_TIM1_COMPB - IRQ __vector_TIM1_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_TIM0_OVF - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_USI_STR - IRQ __vector_USI_OVF diff --git a/device/avr/attiny25.go b/device/avr/attiny25.go index 2b188dd..b26955c 100644 --- a/device/avr/attiny25.go +++ b/device/avr/attiny25.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -41,8 +41,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny25.ld b/device/avr/attiny25.ld deleted file mode 100644 index 3c7aa24..0000000 --- a/device/avr/attiny25.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny25.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x800; -__ram_start = 0x60; -__ram_size = 0x80; -__num_isrs = 15; diff --git a/device/avr/attiny25.s b/device/avr/attiny25.s deleted file mode 100644 index 7c3e723..0000000 --- a/device/avr/attiny25.s +++ /dev/null @@ -1,54 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny25.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_WDT - rjmp __vector_USI_START - rjmp __vector_USI_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_WDT - IRQ __vector_USI_START - IRQ __vector_USI_OVF diff --git a/device/avr/attiny26.go b/device/avr/attiny26.go index beca6b8..8462256 100644 --- a/device/avr/attiny26.go +++ b/device/avr/attiny26.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -38,8 +38,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny26.ld b/device/avr/attiny26.ld deleted file mode 100644 index 52a7699..0000000 --- a/device/avr/attiny26.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny26.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x800; -__ram_start = 0x60; -__ram_size = 0x80; -__num_isrs = 12; diff --git a/device/avr/attiny26.s b/device/avr/attiny26.s deleted file mode 100644 index b3c9c4c..0000000 --- a/device/avr/attiny26.s +++ /dev/null @@ -1,48 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny26.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_IO_PINS - rjmp __vector_TIMER1_CMPA - rjmp __vector_TIMER1_CMPB - rjmp __vector_TIMER1_OVF1 - rjmp __vector_TIMER0_OVF0 - rjmp __vector_USI_STRT - rjmp __vector_USI_OVF - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_ADC - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_IO_PINS - IRQ __vector_TIMER1_CMPA - IRQ __vector_TIMER1_CMPB - IRQ __vector_TIMER1_OVF1 - IRQ __vector_TIMER0_OVF0 - IRQ __vector_USI_STRT - IRQ __vector_USI_OVF - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_ADC diff --git a/device/avr/attiny261.go b/device/avr/attiny261.go index 2edacc7..8319c37 100644 --- a/device/avr/attiny261.go +++ b/device/avr/attiny261.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -45,8 +45,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny261.ld b/device/avr/attiny261.ld deleted file mode 100644 index e1098fc..0000000 --- a/device/avr/attiny261.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny261.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x800; -__ram_start = 0x60; -__ram_size = 0x80; -__num_isrs = 19; diff --git a/device/avr/attiny261.s b/device/avr/attiny261.s deleted file mode 100644 index 5fea0cb..0000000 --- a/device/avr/attiny261.s +++ /dev/null @@ -1,62 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny261.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_USI_START - rjmp __vector_USI_OVF - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_WDT - rjmp __vector_INT1 - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_CAPT - rjmp __vector_TIMER1_COMPD - rjmp __vector_FAULT_PROTECTION - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_USI_START - IRQ __vector_USI_OVF - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_WDT - IRQ __vector_INT1 - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_CAPT - IRQ __vector_TIMER1_COMPD - IRQ __vector_FAULT_PROTECTION diff --git a/device/avr/attiny261a.go b/device/avr/attiny261a.go index ffd5749..742e7c1 100644 --- a/device/avr/attiny261a.go +++ b/device/avr/attiny261a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -45,8 +45,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny261a.ld b/device/avr/attiny261a.ld deleted file mode 100644 index 00a402a..0000000 --- a/device/avr/attiny261a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny261A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x800; -__ram_start = 0x60; -__ram_size = 0x80; -__num_isrs = 19; diff --git a/device/avr/attiny261a.s b/device/avr/attiny261a.s deleted file mode 100644 index 9fc1e8b..0000000 --- a/device/avr/attiny261a.s +++ /dev/null @@ -1,62 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny261A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_USI_START - rjmp __vector_USI_OVF - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_WDT - rjmp __vector_INT1 - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_CAPT - rjmp __vector_TIMER1_COMPD - rjmp __vector_FAULT_PROTECTION - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_USI_START - IRQ __vector_USI_OVF - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_WDT - IRQ __vector_INT1 - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_CAPT - IRQ __vector_TIMER1_COMPD - IRQ __vector_FAULT_PROTECTION diff --git a/device/avr/attiny3214.go b/device/avr/attiny3214.go index c039e71..77dc5a0 100644 --- a/device/avr/attiny3214.go +++ b/device/avr/attiny3214.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -61,8 +61,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny3214.ld b/device/avr/attiny3214.ld deleted file mode 100644 index 6cccd2a..0000000 --- a/device/avr/attiny3214.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny3214.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__mapped_flash_start = 0x8000; -__ram_start = 0x3800; -__ram_size = 0x800; -__num_isrs = 34; diff --git a/device/avr/attiny3214.s b/device/avr/attiny3214.s deleted file mode 100644 index f920fdb..0000000 --- a/device/avr/attiny3214.s +++ /dev/null @@ -1,90 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny3214.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_CRCSCAN_NMI - jmp __vector_BOD_VLM - jmp __vector_PORTA_PORT - jmp __vector_PORTB_PORT - jmp __vector_PORTC_PORT - jmp __vector_RTC_CNT - jmp __vector_RTC_PIT - jmp __vector_TCA0_LUNF - jmp __vector_TCA0_HUNF - jmp __vector_TCA0_LCMP0 - jmp __vector_TCA0_LCMP1 - jmp __vector_TCA0_CMP2 - jmp __vector_TCB0_INT - jmp __vector_TCB1_INT - jmp __vector_TCD0_OVF - jmp __vector_TCD0_TRIG - jmp __vector_AC0_AC - jmp __vector_AC1_AC - jmp __vector_AC2_AC - jmp __vector_ADC0_RESRDY - jmp __vector_ADC0_WCOMP - jmp __vector_ADC1_RESRDY - jmp __vector_ADC1_WCOMP - jmp __vector_TWI0_TWIS - jmp __vector_TWI0_TWIM - jmp __vector_SPI0_INT - jmp __vector_USART0_RXC - jmp __vector_USART0_DRE - jmp __vector_USART0_TXC - jmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_PORTB_PORT - IRQ __vector_PORTC_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCB1_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_AC1_AC - IRQ __vector_AC2_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_ADC1_RESRDY - IRQ __vector_ADC1_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny3216.go b/device/avr/attiny3216.go index bd659b9..81b544c 100644 --- a/device/avr/attiny3216.go +++ b/device/avr/attiny3216.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -61,8 +61,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny3216.ld b/device/avr/attiny3216.ld deleted file mode 100644 index 51d8f1b..0000000 --- a/device/avr/attiny3216.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny3216.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__mapped_flash_start = 0x8000; -__ram_start = 0x3800; -__ram_size = 0x800; -__num_isrs = 34; diff --git a/device/avr/attiny3216.s b/device/avr/attiny3216.s deleted file mode 100644 index c83e1a8..0000000 --- a/device/avr/attiny3216.s +++ /dev/null @@ -1,90 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny3216.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_CRCSCAN_NMI - jmp __vector_BOD_VLM - jmp __vector_PORTA_PORT - jmp __vector_PORTB_PORT - jmp __vector_PORTC_PORT - jmp __vector_RTC_CNT - jmp __vector_RTC_PIT - jmp __vector_TCA0_LUNF - jmp __vector_TCA0_HUNF - jmp __vector_TCA0_LCMP0 - jmp __vector_TCA0_CMP1 - jmp __vector_TCA0_CMP2 - jmp __vector_TCB0_INT - jmp __vector_TCB1_INT - jmp __vector_TCD0_OVF - jmp __vector_TCD0_TRIG - jmp __vector_AC0_AC - jmp __vector_AC1_AC - jmp __vector_AC2_AC - jmp __vector_ADC0_RESRDY - jmp __vector_ADC0_WCOMP - jmp __vector_ADC1_RESRDY - jmp __vector_ADC1_WCOMP - jmp __vector_TWI0_TWIS - jmp __vector_TWI0_TWIM - jmp __vector_SPI0_INT - jmp __vector_USART0_RXC - jmp __vector_USART0_DRE - jmp __vector_USART0_TXC - jmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_PORTB_PORT - IRQ __vector_PORTC_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCB1_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_AC1_AC - IRQ __vector_AC2_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_ADC1_RESRDY - IRQ __vector_ADC1_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny3217.go b/device/avr/attiny3217.go index d369324..5759e67 100644 --- a/device/avr/attiny3217.go +++ b/device/avr/attiny3217.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -61,8 +61,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny3217.ld b/device/avr/attiny3217.ld deleted file mode 100644 index a458385..0000000 --- a/device/avr/attiny3217.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny3217.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x8000; -__mapped_flash_start = 0x8000; -__ram_start = 0x3800; -__ram_size = 0x800; -__num_isrs = 34; diff --git a/device/avr/attiny3217.s b/device/avr/attiny3217.s deleted file mode 100644 index aa2432a..0000000 --- a/device/avr/attiny3217.s +++ /dev/null @@ -1,90 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny3217.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - jmp __vector_RESET - jmp __vector_CRCSCAN_NMI - jmp __vector_BOD_VLM - jmp __vector_PORTA_PORT - jmp __vector_PORTB_PORT - jmp __vector_PORTC_PORT - jmp __vector_RTC_CNT - jmp __vector_RTC_PIT - jmp __vector_TCA0_LUNF - jmp __vector_TCA0_HUNF - jmp __vector_TCA0_LCMP0 - jmp __vector_TCA0_CMP1 - jmp __vector_TCA0_CMP2 - jmp __vector_TCB0_INT - jmp __vector_TCB1_INT - jmp __vector_TCD0_OVF - jmp __vector_TCD0_TRIG - jmp __vector_AC0_AC - jmp __vector_AC1_AC - jmp __vector_AC2_AC - jmp __vector_ADC0_RESRDY - jmp __vector_ADC0_WCOMP - jmp __vector_ADC1_RESRDY - jmp __vector_ADC1_WCOMP - jmp __vector_TWI0_TWIS - jmp __vector_TWI0_TWIM - jmp __vector_SPI0_INT - jmp __vector_USART0_RXC - jmp __vector_USART0_DRE - jmp __vector_USART0_TXC - jmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_PORTB_PORT - IRQ __vector_PORTC_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCB1_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_AC1_AC - IRQ __vector_AC2_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_ADC1_RESRDY - IRQ __vector_ADC1_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny4.go b/device/avr/attiny4.go index 251b011..e6c8888 100644 --- a/device/avr/attiny4.go +++ b/device/avr/attiny4.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -36,8 +36,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny4.ld b/device/avr/attiny4.ld deleted file mode 100644 index ae1d21c..0000000 --- a/device/avr/attiny4.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny4.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x200; -__mapped_flash_start = 0x4000; -__ram_start = 0x40; -__ram_size = 0x20; -__num_isrs = 10; diff --git a/device/avr/attiny4.s b/device/avr/attiny4.s deleted file mode 100644 index e8c53ae..0000000 --- a/device/avr/attiny4.s +++ /dev/null @@ -1,44 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny4.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_TIM0_CAPT - rjmp __vector_TIM0_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_ANA_COMP - rjmp __vector_WDT - rjmp __vector_VLM - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_TIM0_CAPT - IRQ __vector_TIM0_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_ANA_COMP - IRQ __vector_WDT - IRQ __vector_VLM diff --git a/device/avr/attiny40.go b/device/avr/attiny40.go index 5d1fe6c..003d344 100644 --- a/device/avr/attiny40.go +++ b/device/avr/attiny40.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -44,8 +44,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny40.ld b/device/avr/attiny40.ld deleted file mode 100644 index 4b48f62..0000000 --- a/device/avr/attiny40.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny40.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__mapped_flash_start = 0x4000; -__ram_start = 0x40; -__ram_size = 0x100; -__num_isrs = 18; diff --git a/device/avr/attiny40.s b/device/avr/attiny40.s deleted file mode 100644 index 55b111f..0000000 --- a/device/avr/attiny40.s +++ /dev/null @@ -1,60 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny40.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_WDT - rjmp __vector_TIM1_CAPT - rjmp __vector_TIM1_COMPA - rjmp __vector_TIM1_COMPB - rjmp __vector_TIM1_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_TIM0_OVF - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_TWI_SLAVE - rjmp __vector_SPI - rjmp __vector_QTRIP - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIM1_CAPT - IRQ __vector_TIM1_COMPA - IRQ __vector_TIM1_COMPB - IRQ __vector_TIM1_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_TIM0_OVF - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_TWI_SLAVE - IRQ __vector_SPI - IRQ __vector_QTRIP diff --git a/device/avr/attiny412.go b/device/avr/attiny412.go index 3953c69..149a240 100644 --- a/device/avr/attiny412.go +++ b/device/avr/attiny412.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -54,8 +54,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny412.ld b/device/avr/attiny412.ld deleted file mode 100644 index 17fe021..0000000 --- a/device/avr/attiny412.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny412.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__mapped_flash_start = 0x8000; -__ram_start = 0x3f00; -__ram_size = 0x100; -__num_isrs = 27; diff --git a/device/avr/attiny412.s b/device/avr/attiny412.s deleted file mode 100644 index 1605c8d..0000000 --- a/device/avr/attiny412.s +++ /dev/null @@ -1,78 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny412.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_CRCSCAN_NMI - rjmp __vector_BOD_VLM - rjmp __vector_PORTA_PORT - rjmp __vector_default - rjmp __vector_default - rjmp __vector_RTC_CNT - rjmp __vector_RTC_PIT - rjmp __vector_TCA0_LUNF - rjmp __vector_TCA0_HUNF - rjmp __vector_TCA0_LCMP0 - rjmp __vector_TCA0_CMP1 - rjmp __vector_TCA0_CMP2 - rjmp __vector_TCB0_INT - rjmp __vector_TCD0_OVF - rjmp __vector_TCD0_TRIG - rjmp __vector_AC0_AC - rjmp __vector_ADC0_RESRDY - rjmp __vector_ADC0_WCOMP - rjmp __vector_TWI0_TWIS - rjmp __vector_TWI0_TWIM - rjmp __vector_SPI0_INT - rjmp __vector_USART0_RXC - rjmp __vector_USART0_DRE - rjmp __vector_USART0_TXC - rjmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny414.go b/device/avr/attiny414.go index b91bccc..08f5aee 100644 --- a/device/avr/attiny414.go +++ b/device/avr/attiny414.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -55,8 +55,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny414.ld b/device/avr/attiny414.ld deleted file mode 100644 index 487e372..0000000 --- a/device/avr/attiny414.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny414.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__mapped_flash_start = 0x8000; -__ram_start = 0x3f00; -__ram_size = 0x100; -__num_isrs = 28; diff --git a/device/avr/attiny414.s b/device/avr/attiny414.s deleted file mode 100644 index af15418..0000000 --- a/device/avr/attiny414.s +++ /dev/null @@ -1,79 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny414.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_CRCSCAN_NMI - rjmp __vector_BOD_VLM - rjmp __vector_PORTA_PORT - rjmp __vector_PORTB_PORT - rjmp __vector_default - rjmp __vector_RTC_CNT - rjmp __vector_RTC_PIT - rjmp __vector_TCA0_LUNF - rjmp __vector_TCA0_HUNF - rjmp __vector_TCA0_LCMP0 - rjmp __vector_TCA0_CMP1 - rjmp __vector_TCA0_CMP2 - rjmp __vector_TCB0_INT - rjmp __vector_TCD0_OVF - rjmp __vector_TCD0_TRIG - rjmp __vector_AC0_AC - rjmp __vector_ADC0_RESRDY - rjmp __vector_ADC0_WCOMP - rjmp __vector_TWI0_TWIS - rjmp __vector_TWI0_TWIM - rjmp __vector_SPI0_INT - rjmp __vector_USART0_RXC - rjmp __vector_USART0_DRE - rjmp __vector_USART0_TXC - rjmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_PORTB_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny416.go b/device/avr/attiny416.go index f0126af..2d4ecc1 100644 --- a/device/avr/attiny416.go +++ b/device/avr/attiny416.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -56,8 +56,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny416.ld b/device/avr/attiny416.ld deleted file mode 100644 index 0ddccd2..0000000 --- a/device/avr/attiny416.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny416.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__mapped_flash_start = 0x8000; -__ram_start = 0x3f00; -__ram_size = 0x100; -__num_isrs = 29; diff --git a/device/avr/attiny416.s b/device/avr/attiny416.s deleted file mode 100644 index 88d47f4..0000000 --- a/device/avr/attiny416.s +++ /dev/null @@ -1,80 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny416.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_CRCSCAN_NMI - rjmp __vector_BOD_VLM - rjmp __vector_PORTA_PORT - rjmp __vector_PORTB_PORT - rjmp __vector_PORTC_PORT - rjmp __vector_RTC_CNT - rjmp __vector_RTC_PIT - rjmp __vector_TCA0_LUNF - rjmp __vector_TCA0_HUNF - rjmp __vector_TCA0_LCMP0 - rjmp __vector_TCA0_CMP1 - rjmp __vector_TCA0_CMP2 - rjmp __vector_TCB0_INT - rjmp __vector_TCD0_OVF - rjmp __vector_TCD0_TRIG - rjmp __vector_AC0_AC - rjmp __vector_ADC0_RESRDY - rjmp __vector_ADC0_WCOMP - rjmp __vector_TWI0_TWIS - rjmp __vector_TWI0_TWIM - rjmp __vector_SPI0_INT - rjmp __vector_USART0_RXC - rjmp __vector_USART0_DRE - rjmp __vector_USART0_TXC - rjmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_PORTB_PORT - IRQ __vector_PORTC_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny417.go b/device/avr/attiny417.go index 8059641..2e0c683 100644 --- a/device/avr/attiny417.go +++ b/device/avr/attiny417.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -56,8 +56,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny417.ld b/device/avr/attiny417.ld deleted file mode 100644 index 97d5ef2..0000000 --- a/device/avr/attiny417.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny417.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__mapped_flash_start = 0x8000; -__ram_start = 0x3f00; -__ram_size = 0x100; -__num_isrs = 29; diff --git a/device/avr/attiny417.s b/device/avr/attiny417.s deleted file mode 100644 index dd7a3c1..0000000 --- a/device/avr/attiny417.s +++ /dev/null @@ -1,80 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny417.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_CRCSCAN_NMI - rjmp __vector_BOD_VLM - rjmp __vector_PORTA_PORT - rjmp __vector_PORTB_PORT - rjmp __vector_PORTC_PORT - rjmp __vector_RTC_CNT - rjmp __vector_RTC_PIT - rjmp __vector_TCA0_LUNF - rjmp __vector_TCA0_HUNF - rjmp __vector_TCA0_LCMP0 - rjmp __vector_TCA0_CMP1 - rjmp __vector_TCA0_CMP2 - rjmp __vector_TCB0_INT - rjmp __vector_TCD0_OVF - rjmp __vector_TCD0_TRIG - rjmp __vector_AC0_AC - rjmp __vector_ADC0_RESRDY - rjmp __vector_ADC0_WCOMP - rjmp __vector_TWI0_TWIS - rjmp __vector_TWI0_TWIM - rjmp __vector_SPI0_INT - rjmp __vector_USART0_RXC - rjmp __vector_USART0_DRE - rjmp __vector_USART0_TXC - rjmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_PORTB_PORT - IRQ __vector_PORTC_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny4313.go b/device/avr/attiny4313.go index e672a08..165be88 100644 --- a/device/avr/attiny4313.go +++ b/device/avr/attiny4313.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -47,8 +47,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny4313.ld b/device/avr/attiny4313.ld deleted file mode 100644 index 042e60c..0000000 --- a/device/avr/attiny4313.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny4313.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__ram_start = 0x60; -__ram_size = 0x100; -__num_isrs = 21; diff --git a/device/avr/attiny4313.s b/device/avr/attiny4313.s deleted file mode 100644 index 21981db..0000000 --- a/device/avr/attiny4313.s +++ /dev/null @@ -1,66 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny4313.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ANA_COMP - rjmp __vector_PCINT_B - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_USI_START - rjmp __vector_USI_OVERFLOW - rjmp __vector_EEPROM_Ready - rjmp __vector_WDT_OVERFLOW - rjmp __vector_PCINT_A - rjmp __vector_PCINT_D - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ANA_COMP - IRQ __vector_PCINT_B - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_USI_START - IRQ __vector_USI_OVERFLOW - IRQ __vector_EEPROM_Ready - IRQ __vector_WDT_OVERFLOW - IRQ __vector_PCINT_A - IRQ __vector_PCINT_D diff --git a/device/avr/attiny43u.go b/device/avr/attiny43u.go index 4ef0332..b574328 100644 --- a/device/avr/attiny43u.go +++ b/device/avr/attiny43u.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -42,8 +42,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny43u.ld b/device/avr/attiny43u.ld deleted file mode 100644 index 5dfe1c0..0000000 --- a/device/avr/attiny43u.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny43U.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__ram_start = 0x60; -__ram_size = 0x100; -__num_isrs = 16; diff --git a/device/avr/attiny43u.s b/device/avr/attiny43u.s deleted file mode 100644 index 6b2bc46..0000000 --- a/device/avr/attiny43u.s +++ /dev/null @@ -1,56 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny43U.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_WDT - rjmp __vector_TIM1_COMPA - rjmp __vector_TIM1_COMPB - rjmp __vector_TIM1_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_TIM0_OVF - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_USI_START - rjmp __vector_USI_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_TIM1_COMPA - IRQ __vector_TIM1_COMPB - IRQ __vector_TIM1_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_TIM0_OVF - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_USI_START - IRQ __vector_USI_OVF diff --git a/device/avr/attiny44.go b/device/avr/attiny44.go index d6c1347..618f537 100644 --- a/device/avr/attiny44.go +++ b/device/avr/attiny44.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -43,8 +43,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny44.ld b/device/avr/attiny44.ld deleted file mode 100644 index ced98d0..0000000 --- a/device/avr/attiny44.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny44.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__ram_start = 0x60; -__ram_size = 0x100; -__num_isrs = 17; diff --git a/device/avr/attiny44.s b/device/avr/attiny44.s deleted file mode 100644 index b6dcbe7..0000000 --- a/device/avr/attiny44.s +++ /dev/null @@ -1,58 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny44.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_EXT_INT0 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_WDT - rjmp __vector_TIM1_CAPT - rjmp __vector_TIM1_COMPA - rjmp __vector_TIM1_COMPB - rjmp __vector_TIM1_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_TIM0_OVF - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_USI_STR - rjmp __vector_USI_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_EXT_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_TIM1_CAPT - IRQ __vector_TIM1_COMPA - IRQ __vector_TIM1_COMPB - IRQ __vector_TIM1_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_TIM0_OVF - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_USI_STR - IRQ __vector_USI_OVF diff --git a/device/avr/attiny441.go b/device/avr/attiny441.go index 0e2f3f5..aa038e1 100644 --- a/device/avr/attiny441.go +++ b/device/avr/attiny441.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -56,8 +56,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny441.ld b/device/avr/attiny441.ld deleted file mode 100644 index 9858d57..0000000 --- a/device/avr/attiny441.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny441.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__ram_start = 0x100; -__ram_size = 0x100; -__num_isrs = 30; diff --git a/device/avr/attiny441.s b/device/avr/attiny441.s deleted file mode 100644 index 397fa7b..0000000 --- a/device/avr/attiny441.s +++ /dev/null @@ -1,84 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny441.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_WDT - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_ANA_COMP0 - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP1 - rjmp __vector_TIMER2_CAPT - rjmp __vector_TIMER2_COMPA - rjmp __vector_TIMER2_COMPB - rjmp __vector_TIMER2_OVF - rjmp __vector_SPI - rjmp __vector_USART0_START - rjmp __vector_USART0_RX - rjmp __vector_USART0_UDRE - rjmp __vector_USART0_TX - rjmp __vector_USART1_START - rjmp __vector_USART1_RX - rjmp __vector_USART1_UDRE - rjmp __vector_USART1_TX - rjmp __vector_TWI_SLAVE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_ANA_COMP0 - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP1 - IRQ __vector_TIMER2_CAPT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_SPI - IRQ __vector_USART0_START - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USART1_START - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI_SLAVE diff --git a/device/avr/attiny44a.go b/device/avr/attiny44a.go index 459fe08..24d7c63 100644 --- a/device/avr/attiny44a.go +++ b/device/avr/attiny44a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -43,8 +43,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny44a.ld b/device/avr/attiny44a.ld deleted file mode 100644 index 5a421a9..0000000 --- a/device/avr/attiny44a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny44A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__ram_start = 0x60; -__ram_size = 0x100; -__num_isrs = 17; diff --git a/device/avr/attiny44a.s b/device/avr/attiny44a.s deleted file mode 100644 index ab7e18d..0000000 --- a/device/avr/attiny44a.s +++ /dev/null @@ -1,58 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny44A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_EXT_INT0 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_WDT - rjmp __vector_TIM1_CAPT - rjmp __vector_TIM1_COMPA - rjmp __vector_TIM1_COMPB - rjmp __vector_TIM1_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_TIM0_OVF - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_USI_STR - rjmp __vector_USI_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_EXT_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_TIM1_CAPT - IRQ __vector_TIM1_COMPA - IRQ __vector_TIM1_COMPB - IRQ __vector_TIM1_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_TIM0_OVF - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_USI_STR - IRQ __vector_USI_OVF diff --git a/device/avr/attiny45.go b/device/avr/attiny45.go index 7b9f6c0..efc85fe 100644 --- a/device/avr/attiny45.go +++ b/device/avr/attiny45.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -41,8 +41,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny45.ld b/device/avr/attiny45.ld deleted file mode 100644 index e81bf54..0000000 --- a/device/avr/attiny45.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny45.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__ram_start = 0x60; -__ram_size = 0x100; -__num_isrs = 15; diff --git a/device/avr/attiny45.s b/device/avr/attiny45.s deleted file mode 100644 index 7e20d70..0000000 --- a/device/avr/attiny45.s +++ /dev/null @@ -1,54 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny45.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_WDT - rjmp __vector_USI_START - rjmp __vector_USI_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_WDT - IRQ __vector_USI_START - IRQ __vector_USI_OVF diff --git a/device/avr/attiny461.go b/device/avr/attiny461.go index 91454b2..a48c0de 100644 --- a/device/avr/attiny461.go +++ b/device/avr/attiny461.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -45,8 +45,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny461.ld b/device/avr/attiny461.ld deleted file mode 100644 index d85b968..0000000 --- a/device/avr/attiny461.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny461.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__ram_start = 0x60; -__ram_size = 0x100; -__num_isrs = 19; diff --git a/device/avr/attiny461.s b/device/avr/attiny461.s deleted file mode 100644 index 031fd50..0000000 --- a/device/avr/attiny461.s +++ /dev/null @@ -1,62 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny461.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_USI_START - rjmp __vector_USI_OVF - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_WDT - rjmp __vector_INT1 - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_CAPT - rjmp __vector_TIMER1_COMPD - rjmp __vector_FAULT_PROTECTION - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_USI_START - IRQ __vector_USI_OVF - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_WDT - IRQ __vector_INT1 - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_CAPT - IRQ __vector_TIMER1_COMPD - IRQ __vector_FAULT_PROTECTION diff --git a/device/avr/attiny461a.go b/device/avr/attiny461a.go index c11983d..6e5528e 100644 --- a/device/avr/attiny461a.go +++ b/device/avr/attiny461a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -45,8 +45,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny461a.ld b/device/avr/attiny461a.ld deleted file mode 100644 index c9338eb..0000000 --- a/device/avr/attiny461a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny461A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__ram_start = 0x60; -__ram_size = 0x100; -__num_isrs = 19; diff --git a/device/avr/attiny461a.s b/device/avr/attiny461a.s deleted file mode 100644 index b85f7f3..0000000 --- a/device/avr/attiny461a.s +++ /dev/null @@ -1,62 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny461A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_USI_START - rjmp __vector_USI_OVF - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_WDT - rjmp __vector_INT1 - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_CAPT - rjmp __vector_TIMER1_COMPD - rjmp __vector_FAULT_PROTECTION - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_USI_START - IRQ __vector_USI_OVF - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_WDT - IRQ __vector_INT1 - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_CAPT - IRQ __vector_TIMER1_COMPD - IRQ __vector_FAULT_PROTECTION diff --git a/device/avr/attiny48.go b/device/avr/attiny48.go index 85a93ff..b89bf5a 100644 --- a/device/avr/attiny48.go +++ b/device/avr/attiny48.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -46,8 +46,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny48.ld b/device/avr/attiny48.ld deleted file mode 100644 index ae0b1b5..0000000 --- a/device/avr/attiny48.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny48.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x1000; -__ram_start = 0x100; -__ram_size = 0x100; -__num_isrs = 20; diff --git a/device/avr/attiny48.s b/device/avr/attiny48.s deleted file mode 100644 index 1e96d27..0000000 --- a/device/avr/attiny48.s +++ /dev/null @@ -1,64 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny48.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_PCINT3 - rjmp __vector_WDT - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_ANALOG_COMP - rjmp __vector_TWI - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI diff --git a/device/avr/attiny5.go b/device/avr/attiny5.go index 799565c..9311c21 100644 --- a/device/avr/attiny5.go +++ b/device/avr/attiny5.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -37,8 +37,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny5.ld b/device/avr/attiny5.ld deleted file mode 100644 index 41cc19a..0000000 --- a/device/avr/attiny5.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny5.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x200; -__mapped_flash_start = 0x4000; -__ram_start = 0x40; -__ram_size = 0x20; -__num_isrs = 11; diff --git a/device/avr/attiny5.s b/device/avr/attiny5.s deleted file mode 100644 index 007448e..0000000 --- a/device/avr/attiny5.s +++ /dev/null @@ -1,46 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny5.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_TIM0_CAPT - rjmp __vector_TIM0_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_ANA_COMP - rjmp __vector_WDT - rjmp __vector_VLM - rjmp __vector_ADC - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_TIM0_CAPT - IRQ __vector_TIM0_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_ANA_COMP - IRQ __vector_WDT - IRQ __vector_VLM - IRQ __vector_ADC diff --git a/device/avr/attiny80.go b/device/avr/attiny80.go index e45bde1..1d7517e 100644 --- a/device/avr/attiny80.go +++ b/device/avr/attiny80.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny80.ld b/device/avr/attiny80.ld deleted file mode 100644 index 8da4071..0000000 --- a/device/avr/attiny80.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny80.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 31; diff --git a/device/avr/attiny80.s b/device/avr/attiny80.s deleted file mode 100644 index 56409d5..0000000 --- a/device/avr/attiny80.s +++ /dev/null @@ -1,94 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny80.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_default - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_WDT - rjmp __vector_TIMER2_COMPA - rjmp __vector_TIMER2_COMPB - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_default - rjmp __vector_default - rjmp __vector_default - rjmp __vector_CLI - rjmp __vector_EE_READY - rjmp __vector_ANALOG_COMP - rjmp __vector_default - rjmp __vector_SPM_Ready - rjmp __vector_default - rjmp __vector_default - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_USART_START - rjmp __vector_TIMER3_CAPT - rjmp __vector_TIMER3_COMPA - rjmp __vector_TIMER3_COMPB - rjmp __vector_TIMER3_OVF - rjmp __vector_default - rjmp __vector_PTC_EOC - rjmp __vector_PTC_WCOMP - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_CLI - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_SPM_Ready - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_USART_START - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_OVF - IRQ __vector_PTC_EOC - IRQ __vector_PTC_WCOMP diff --git a/device/avr/attiny814.go b/device/avr/attiny814.go index e13ca5d..30db6ff 100644 --- a/device/avr/attiny814.go +++ b/device/avr/attiny814.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -56,8 +56,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny814.ld b/device/avr/attiny814.ld deleted file mode 100644 index aa26cd4..0000000 --- a/device/avr/attiny814.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny814.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__mapped_flash_start = 0x8000; -__ram_start = 0x3e00; -__ram_size = 0x200; -__num_isrs = 29; diff --git a/device/avr/attiny814.s b/device/avr/attiny814.s deleted file mode 100644 index 471ef17..0000000 --- a/device/avr/attiny814.s +++ /dev/null @@ -1,80 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny814.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_CRCSCAN_NMI - rjmp __vector_BOD_VLM - rjmp __vector_PORTA_PORT - rjmp __vector_PORTB_PORT - rjmp __vector_PORTC_PORT - rjmp __vector_RTC_CNT - rjmp __vector_RTC_PIT - rjmp __vector_TCA0_LUNF - rjmp __vector_TCA0_HUNF - rjmp __vector_TCA0_LCMP0 - rjmp __vector_TCA0_CMP1 - rjmp __vector_TCA0_CMP2 - rjmp __vector_TCB0_INT - rjmp __vector_TCD0_OVF - rjmp __vector_TCD0_TRIG - rjmp __vector_AC0_AC - rjmp __vector_ADC0_RESRDY - rjmp __vector_ADC0_WCOMP - rjmp __vector_TWI0_TWIS - rjmp __vector_TWI0_TWIM - rjmp __vector_SPI0_INT - rjmp __vector_USART0_RXC - rjmp __vector_USART0_DRE - rjmp __vector_USART0_TXC - rjmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_PORTB_PORT - IRQ __vector_PORTC_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny816.go b/device/avr/attiny816.go index 8b8a0d7..7c92792 100644 --- a/device/avr/attiny816.go +++ b/device/avr/attiny816.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -56,8 +56,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny816.ld b/device/avr/attiny816.ld deleted file mode 100644 index a85be20..0000000 --- a/device/avr/attiny816.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny816.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__mapped_flash_start = 0x8000; -__ram_start = 0x3e00; -__ram_size = 0x200; -__num_isrs = 29; diff --git a/device/avr/attiny816.s b/device/avr/attiny816.s deleted file mode 100644 index fd029ad..0000000 --- a/device/avr/attiny816.s +++ /dev/null @@ -1,80 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny816.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_CRCSCAN_NMI - rjmp __vector_BOD_VLM - rjmp __vector_PORTA_PORT - rjmp __vector_PORTB_PORT - rjmp __vector_PORTC_PORT - rjmp __vector_RTC_CNT - rjmp __vector_RTC_PIT - rjmp __vector_TCA0_LUNF - rjmp __vector_TCA0_HUNF - rjmp __vector_TCA0_LCMP0 - rjmp __vector_TCA0_CMP1 - rjmp __vector_TCA0_CMP2 - rjmp __vector_TCB0_INT - rjmp __vector_TCD0_OVF - rjmp __vector_TCD0_TRIG - rjmp __vector_AC0_AC - rjmp __vector_ADC0_RESRDY - rjmp __vector_ADC0_WCOMP - rjmp __vector_TWI0_TWIS - rjmp __vector_TWI0_TWIM - rjmp __vector_SPI0_INT - rjmp __vector_USART0_RXC - rjmp __vector_USART0_DRE - rjmp __vector_USART0_TXC - rjmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_PORTB_PORT - IRQ __vector_PORTC_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny817.go b/device/avr/attiny817.go index 8d23d8c..71122d1 100644 --- a/device/avr/attiny817.go +++ b/device/avr/attiny817.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -56,8 +56,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny817.ld b/device/avr/attiny817.ld deleted file mode 100644 index 946cc03..0000000 --- a/device/avr/attiny817.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny817.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__mapped_flash_start = 0x8000; -__ram_start = 0x3e00; -__ram_size = 0x200; -__num_isrs = 29; diff --git a/device/avr/attiny817.s b/device/avr/attiny817.s deleted file mode 100644 index 52d187a..0000000 --- a/device/avr/attiny817.s +++ /dev/null @@ -1,80 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny817.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_CRCSCAN_NMI - rjmp __vector_BOD_VLM - rjmp __vector_PORTA_PORT - rjmp __vector_PORTB_PORT - rjmp __vector_PORTC_PORT - rjmp __vector_RTC_CNT - rjmp __vector_RTC_PIT - rjmp __vector_TCA0_LUNF - rjmp __vector_TCA0_HUNF - rjmp __vector_TCA0_LCMP0 - rjmp __vector_TCA0_CMP1 - rjmp __vector_TCA0_LCMP2 - rjmp __vector_TCB0_INT - rjmp __vector_TCD0_OVF - rjmp __vector_TCD0_TRIG - rjmp __vector_AC0_AC - rjmp __vector_ADC0_RESRDY - rjmp __vector_ADC0_WCOMP - rjmp __vector_TWI0_TWIS - rjmp __vector_TWI0_TWIM - rjmp __vector_SPI0_INT - rjmp __vector_USART0_RXC - rjmp __vector_USART0_DRE - rjmp __vector_USART0_TXC - rjmp __vector_NVMCTRL_EE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_CRCSCAN_NMI - IRQ __vector_BOD_VLM - IRQ __vector_PORTA_PORT - IRQ __vector_PORTB_PORT - IRQ __vector_PORTC_PORT - IRQ __vector_RTC_CNT - IRQ __vector_RTC_PIT - IRQ __vector_TCA0_LUNF - IRQ __vector_TCA0_OVF - IRQ __vector_TCA0_HUNF - IRQ __vector_TCA0_LCMP0 - IRQ __vector_TCA0_CMP0 - IRQ __vector_TCA0_CMP1 - IRQ __vector_TCA0_LCMP1 - IRQ __vector_TCA0_LCMP2 - IRQ __vector_TCA0_CMP2 - IRQ __vector_TCB0_INT - IRQ __vector_TCD0_OVF - IRQ __vector_TCD0_TRIG - IRQ __vector_AC0_AC - IRQ __vector_ADC0_RESRDY - IRQ __vector_ADC0_WCOMP - IRQ __vector_TWI0_TWIS - IRQ __vector_TWI0_TWIM - IRQ __vector_SPI0_INT - IRQ __vector_USART0_RXC - IRQ __vector_USART0_DRE - IRQ __vector_USART0_TXC - IRQ __vector_NVMCTRL_EE diff --git a/device/avr/attiny828.go b/device/avr/attiny828.go index 47151b6..c640634 100644 --- a/device/avr/attiny828.go +++ b/device/avr/attiny828.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny828.ld b/device/avr/attiny828.ld deleted file mode 100644 index 8bffb50..0000000 --- a/device/avr/attiny828.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny828.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 26; diff --git a/device/avr/attiny828.s b/device/avr/attiny828.s deleted file mode 100644 index 4fe0fe5..0000000 --- a/device/avr/attiny828.s +++ /dev/null @@ -1,76 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny828.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_PCINT3 - rjmp __vector_WDT - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_USART_START - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_ADC - rjmp __vector_EE_READY - rjmp __vector_ANALOG_COMP - rjmp __vector_TWI_SLAVE - rjmp __vector_SPM_Ready - rjmp __vector_QTRIP - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_USART_START - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_ADC - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI_SLAVE - IRQ __vector_SPM_Ready - IRQ __vector_QTRIP diff --git a/device/avr/attiny84.go b/device/avr/attiny84.go index 8dca20e..ae14f40 100644 --- a/device/avr/attiny84.go +++ b/device/avr/attiny84.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -43,8 +43,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny84.ld b/device/avr/attiny84.ld deleted file mode 100644 index aa98af5..0000000 --- a/device/avr/attiny84.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny84.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x60; -__ram_size = 0x200; -__num_isrs = 17; diff --git a/device/avr/attiny84.s b/device/avr/attiny84.s deleted file mode 100644 index 8bf25c6..0000000 --- a/device/avr/attiny84.s +++ /dev/null @@ -1,58 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny84.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_EXT_INT0 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_WDT - rjmp __vector_TIM1_CAPT - rjmp __vector_TIM1_COMPA - rjmp __vector_TIM1_COMPB - rjmp __vector_TIM1_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_TIM0_OVF - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_USI_STR - rjmp __vector_USI_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_EXT_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_TIM1_CAPT - IRQ __vector_TIM1_COMPA - IRQ __vector_TIM1_COMPB - IRQ __vector_TIM1_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_TIM0_OVF - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_USI_STR - IRQ __vector_USI_OVF diff --git a/device/avr/attiny840.go b/device/avr/attiny840.go index 4a64b01..ba40f2c 100644 --- a/device/avr/attiny840.go +++ b/device/avr/attiny840.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -57,8 +57,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny840.ld b/device/avr/attiny840.ld deleted file mode 100644 index fc51041..0000000 --- a/device/avr/attiny840.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny840.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x400; -__num_isrs = 31; diff --git a/device/avr/attiny840.s b/device/avr/attiny840.s deleted file mode 100644 index 659628b..0000000 --- a/device/avr/attiny840.s +++ /dev/null @@ -1,94 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny840.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_default - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_WDT - rjmp __vector_TIMER2_COMPA - rjmp __vector_TIMER2_COMPB - rjmp __vector_TIMER2_OVF - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_default - rjmp __vector_default - rjmp __vector_default - rjmp __vector_CLI - rjmp __vector_EE_READY - rjmp __vector_ANALOG_COMP - rjmp __vector_default - rjmp __vector_SPM_Ready - rjmp __vector_default - rjmp __vector_default - rjmp __vector_USART_RX - rjmp __vector_USART_UDRE - rjmp __vector_USART_TX - rjmp __vector_USART_START - rjmp __vector_TIMER3_CAPT - rjmp __vector_TIMER3_COMPA - rjmp __vector_TIMER3_COMPB - rjmp __vector_TIMER3_OVF - rjmp __vector_default - rjmp __vector_PTC_EOC - rjmp __vector_PTC_WCOMP - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_WDT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_CLI - IRQ __vector_EE_READY - IRQ __vector_ANALOG_COMP - IRQ __vector_SPM_Ready - IRQ __vector_USART_RX - IRQ __vector_USART_UDRE - IRQ __vector_USART_TX - IRQ __vector_USART_START - IRQ __vector_TIMER3_CAPT - IRQ __vector_TIMER3_COMPA - IRQ __vector_TIMER3_COMPB - IRQ __vector_TIMER3_OVF - IRQ __vector_PTC_EOC - IRQ __vector_PTC_WCOMP diff --git a/device/avr/attiny841.go b/device/avr/attiny841.go index e0ebcba..230ab3c 100644 --- a/device/avr/attiny841.go +++ b/device/avr/attiny841.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -56,8 +56,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny841.ld b/device/avr/attiny841.ld deleted file mode 100644 index 3204cfe..0000000 --- a/device/avr/attiny841.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny841.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 30; diff --git a/device/avr/attiny841.s b/device/avr/attiny841.s deleted file mode 100644 index 5b86c93..0000000 --- a/device/avr/attiny841.s +++ /dev/null @@ -1,84 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny841.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_WDT - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_ANA_COMP0 - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP1 - rjmp __vector_TIMER2_CAPT - rjmp __vector_TIMER2_COMPA - rjmp __vector_TIMER2_COMPB - rjmp __vector_TIMER2_OVF - rjmp __vector_SPI - rjmp __vector_USART0_START - rjmp __vector_USART0_RX - rjmp __vector_USART0_UDRE - rjmp __vector_USART0_TX - rjmp __vector_USART1_START - rjmp __vector_USART1_RX - rjmp __vector_USART1_UDRE - rjmp __vector_USART1_TX - rjmp __vector_TWI_SLAVE - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_ANA_COMP0 - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP1 - IRQ __vector_TIMER2_CAPT - IRQ __vector_TIMER2_COMPA - IRQ __vector_TIMER2_COMPB - IRQ __vector_TIMER2_OVF - IRQ __vector_SPI - IRQ __vector_USART0_START - IRQ __vector_USART0_RX - IRQ __vector_USART0_UDRE - IRQ __vector_USART0_TX - IRQ __vector_USART1_START - IRQ __vector_USART1_RX - IRQ __vector_USART1_UDRE - IRQ __vector_USART1_TX - IRQ __vector_TWI_SLAVE diff --git a/device/avr/attiny84a.go b/device/avr/attiny84a.go index be3de5c..f9bf77d 100644 --- a/device/avr/attiny84a.go +++ b/device/avr/attiny84a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -43,8 +43,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny84a.ld b/device/avr/attiny84a.ld deleted file mode 100644 index 5df167e..0000000 --- a/device/avr/attiny84a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny84A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x60; -__ram_size = 0x200; -__num_isrs = 17; diff --git a/device/avr/attiny84a.s b/device/avr/attiny84a.s deleted file mode 100644 index 73e7ed7..0000000 --- a/device/avr/attiny84a.s +++ /dev/null @@ -1,58 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny84A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_EXT_INT0 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_WDT - rjmp __vector_TIM1_CAPT - rjmp __vector_TIM1_COMPA - rjmp __vector_TIM1_COMPB - rjmp __vector_TIM1_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_TIM0_OVF - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_USI_STR - rjmp __vector_USI_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_EXT_INT0 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_TIM1_CAPT - IRQ __vector_TIM1_COMPA - IRQ __vector_TIM1_COMPB - IRQ __vector_TIM1_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_TIM0_OVF - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_USI_STR - IRQ __vector_USI_OVF diff --git a/device/avr/attiny85.go b/device/avr/attiny85.go index 3e1e529..8d1d33c 100644 --- a/device/avr/attiny85.go +++ b/device/avr/attiny85.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -41,8 +41,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny85.ld b/device/avr/attiny85.ld deleted file mode 100644 index 9873f2f..0000000 --- a/device/avr/attiny85.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny85.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x60; -__ram_size = 0x200; -__num_isrs = 15; diff --git a/device/avr/attiny85.s b/device/avr/attiny85.s deleted file mode 100644 index 5eafa67..0000000 --- a/device/avr/attiny85.s +++ /dev/null @@ -1,54 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny85.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_WDT - rjmp __vector_USI_START - rjmp __vector_USI_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_WDT - IRQ __vector_USI_START - IRQ __vector_USI_OVF diff --git a/device/avr/attiny861.go b/device/avr/attiny861.go index adc6aa7..9089cad 100644 --- a/device/avr/attiny861.go +++ b/device/avr/attiny861.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -45,8 +45,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny861.ld b/device/avr/attiny861.ld deleted file mode 100644 index dc09a54..0000000 --- a/device/avr/attiny861.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny861.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x60; -__ram_size = 0x200; -__num_isrs = 19; diff --git a/device/avr/attiny861.s b/device/avr/attiny861.s deleted file mode 100644 index d44a43b..0000000 --- a/device/avr/attiny861.s +++ /dev/null @@ -1,62 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny861.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_USI_START - rjmp __vector_USI_OVF - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_WDT - rjmp __vector_INT1 - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_CAPT - rjmp __vector_TIMER1_COMPD - rjmp __vector_FAULT_PROTECTION - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_USI_START - IRQ __vector_USI_OVF - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_WDT - IRQ __vector_INT1 - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_CAPT - IRQ __vector_TIMER1_COMPD - IRQ __vector_FAULT_PROTECTION diff --git a/device/avr/attiny861a.go b/device/avr/attiny861a.go index bd10f00..672451a 100644 --- a/device/avr/attiny861a.go +++ b/device/avr/attiny861a.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -45,8 +45,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny861a.ld b/device/avr/attiny861a.ld deleted file mode 100644 index df8a350..0000000 --- a/device/avr/attiny861a.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny861A.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x60; -__ram_size = 0x200; -__num_isrs = 19; diff --git a/device/avr/attiny861a.s b/device/avr/attiny861a.s deleted file mode 100644 index d0b0259..0000000 --- a/device/avr/attiny861a.s +++ /dev/null @@ -1,62 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny861A.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_OVF - rjmp __vector_USI_START - rjmp __vector_USI_OVF - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_ADC - rjmp __vector_WDT - rjmp __vector_INT1 - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_CAPT - rjmp __vector_TIMER1_COMPD - rjmp __vector_FAULT_PROTECTION - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_OVF - IRQ __vector_USI_START - IRQ __vector_USI_OVF - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_ADC - IRQ __vector_WDT - IRQ __vector_INT1 - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_CAPT - IRQ __vector_TIMER1_COMPD - IRQ __vector_FAULT_PROTECTION diff --git a/device/avr/attiny87.go b/device/avr/attiny87.go index 9e47b31..abebcb3 100644 --- a/device/avr/attiny87.go +++ b/device/avr/attiny87.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -46,8 +46,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny87.ld b/device/avr/attiny87.ld deleted file mode 100644 index 0d0874d..0000000 --- a/device/avr/attiny87.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny87.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 20; diff --git a/device/avr/attiny87.s b/device/avr/attiny87.s deleted file mode 100644 index 1caa4a8..0000000 --- a/device/avr/attiny87.s +++ /dev/null @@ -1,64 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny87.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_WDT - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_OVF - rjmp __vector_LIN_TC - rjmp __vector_LIN_ERR - rjmp __vector_SPI_STC - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_ANA_COMP - rjmp __vector_USI_START - rjmp __vector_USI_OVF - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_WDT - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_OVF - IRQ __vector_LIN_TC - IRQ __vector_LIN_ERR - IRQ __vector_SPI_STC - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_ANA_COMP - IRQ __vector_USI_START - IRQ __vector_USI_OVF diff --git a/device/avr/attiny88.go b/device/avr/attiny88.go index 712914d..18077df 100644 --- a/device/avr/attiny88.go +++ b/device/avr/attiny88.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -46,8 +46,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny88.ld b/device/avr/attiny88.ld deleted file mode 100644 index 47fda96..0000000 --- a/device/avr/attiny88.ld +++ /dev/null @@ -1,7 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny88.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x2000; -__ram_start = 0x100; -__ram_size = 0x200; -__num_isrs = 20; diff --git a/device/avr/attiny88.s b/device/avr/attiny88.s deleted file mode 100644 index ca34a58..0000000 --- a/device/avr/attiny88.s +++ /dev/null @@ -1,64 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny88.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_INT1 - rjmp __vector_PCINT0 - rjmp __vector_PCINT1 - rjmp __vector_PCINT2 - rjmp __vector_PCINT3 - rjmp __vector_WDT - rjmp __vector_TIMER1_CAPT - rjmp __vector_TIMER1_COMPA - rjmp __vector_TIMER1_COMPB - rjmp __vector_TIMER1_OVF - rjmp __vector_TIMER0_COMPA - rjmp __vector_TIMER0_COMPB - rjmp __vector_TIMER0_OVF - rjmp __vector_SPI_STC - rjmp __vector_ADC - rjmp __vector_EE_RDY - rjmp __vector_ANALOG_COMP - rjmp __vector_TWI - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_INT1 - IRQ __vector_PCINT0 - IRQ __vector_PCINT1 - IRQ __vector_PCINT2 - IRQ __vector_PCINT3 - IRQ __vector_WDT - IRQ __vector_TIMER1_CAPT - IRQ __vector_TIMER1_COMPA - IRQ __vector_TIMER1_COMPB - IRQ __vector_TIMER1_OVF - IRQ __vector_TIMER0_COMPA - IRQ __vector_TIMER0_COMPB - IRQ __vector_TIMER0_OVF - IRQ __vector_SPI_STC - IRQ __vector_ADC - IRQ __vector_EE_RDY - IRQ __vector_ANALOG_COMP - IRQ __vector_TWI diff --git a/device/avr/attiny9.go b/device/avr/attiny9.go index eb6318c..7f0d0af 100644 --- a/device/avr/attiny9.go +++ b/device/avr/attiny9.go @@ -7,7 +7,7 @@ package avr import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -36,8 +36,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export __vector_RESET //go:interrupt diff --git a/device/avr/attiny9.ld b/device/avr/attiny9.ld deleted file mode 100644 index b943a51..0000000 --- a/device/avr/attiny9.ld +++ /dev/null @@ -1,8 +0,0 @@ -/* Automatically generated file. DO NOT EDIT. */ -/* Generated by gen-device-avr.go from ATtiny9.atdf, see http://packs.download.atmel.com/ */ - -__flash_size = 0x400; -__mapped_flash_start = 0x4000; -__ram_start = 0x40; -__ram_size = 0x20; -__num_isrs = 10; diff --git a/device/avr/attiny9.s b/device/avr/attiny9.s deleted file mode 100644 index 3207c6b..0000000 --- a/device/avr/attiny9.s +++ /dev/null @@ -1,44 +0,0 @@ -; Automatically generated file. DO NOT EDIT. -; Generated by gen-device-avr.go from ATtiny9.atdf, see http://packs.download.atmel.com/ - -; This is the default handler for interrupts, if triggered but not defined. -; Sleep inside so that an accidentally triggered interrupt won't drain the -; battery of a battery-powered device. -.section .text.__vector_default -.global __vector_default -__vector_default: - sleep - rjmp __vector_default - -; Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, __vector_default -.endm - -; The interrupt vector of this device. Must be placed at address 0 by the linker. -.section .vectors, "a", %progbits -.global __vectors - rjmp __vector_RESET - rjmp __vector_INT0 - rjmp __vector_PCINT0 - rjmp __vector_TIM0_CAPT - rjmp __vector_TIM0_OVF - rjmp __vector_TIM0_COMPA - rjmp __vector_TIM0_COMPB - rjmp __vector_ANA_COMP - rjmp __vector_WDT - rjmp __vector_VLM - - ; Define default implementations for interrupts, redirecting to - ; __vector_default when not implemented. - IRQ __vector_RESET - IRQ __vector_INT0 - IRQ __vector_PCINT0 - IRQ __vector_TIM0_CAPT - IRQ __vector_TIM0_OVF - IRQ __vector_TIM0_COMPA - IRQ __vector_TIM0_COMPB - IRQ __vector_ANA_COMP - IRQ __vector_WDT - IRQ __vector_VLM diff --git a/device/avr/avr.go b/device/avr/avr.go index 1890e18..fe5d4a9 100644 --- a/device/avr/avr.go +++ b/device/avr/avr.go @@ -3,7 +3,9 @@ package avr // Run the given assembly code. The code will be marked as having side effects, // as it doesn't produce output and thus would normally be eliminated by the // optimizer. -func Asm(asm string) +// +//llgo:link Asm llgo.asm +func Asm(asm string) {} // Run the given inline assembly. The code will be marked as having side // effects, as it would otherwise be optimized away. The inline assembly string @@ -18,4 +20,6 @@ func Asm(asm string) // // You can use {} in the asm string (which expands to a register) to set the // return value. -func AsmFull(asm string, regs map[string]interface{}) uintptr +// +//llgo:link AsmFull llgo.asm +func AsmFull(asm string, regs map[string]interface{}) uintptr { return 0 } diff --git a/device/esp/esp32.S b/device/esp/esp32.S deleted file mode 100644 index 1179a2d..0000000 --- a/device/esp/esp32.S +++ /dev/null @@ -1,57 +0,0 @@ - -// The following definitions were copied from: -// esp-idf/components/xtensa/include/xtensa/corebits.h -#define PS_WOE_MASK 0x00040000 -#define PS_OWB_MASK 0x00000F00 -#define PS_CALLINC_MASK 0x00030000 -#define PS_WOE PS_WOE_MASK - -// Only calling it call_start_cpu0 for consistency with ESP-IDF. -.section .text.call_start_cpu0 -1: - .long _stack_top -.global call_start_cpu0 -call_start_cpu0: - // We need to set the stack pointer to a different value. This is somewhat - // complicated in the Xtensa architecture. The code below is a modified - // version of the following code: - // https://github.com/espressif/esp-idf/blob/c77c4ccf/components/xtensa/include/xt_instr_macros.h#L47 - - // Disable WOE. - rsr.ps a2 - movi a3, ~(PS_WOE_MASK) - and a2, a2, a3 - wsr.ps a2 - rsync - - // Set WINDOWSTART to 1 << WINDOWBASE. - rsr.windowbase a2 - ssl a2 - movi a2, 1 - sll a2, a2 - wsr.windowstart a2 - rsync - - // Load new stack pointer. - l32r sp, 1b - - // Re-enable WOE. - rsr.ps a2 - movi a3, PS_WOE - or a2, a2, a3 - wsr.ps a2 - rsync - - // Enable the FPU (coprocessor 0 so the lowest bit). - movi a2, 1 - wsr.cpenable a2 - rsync - - // Jump to the runtime start function written in Go. - call4 main - -.section .text.tinygo_scanCurrentStack -.global tinygo_scanCurrentStack -tinygo_scanCurrentStack: - // TODO: save callee saved registers on the stack - j tinygo_scanstack diff --git a/device/esp/esp32.go b/device/esp/esp32.go index 381c6cd..97bb945 100644 --- a/device/esp/esp32.go +++ b/device/esp/esp32.go @@ -10,7 +10,7 @@ package esp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -232,8 +232,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { case IRQ_WIFI_MAC: diff --git a/device/esp/esp32c2.go b/device/esp/esp32c2.go index 74a4181..b1ad620 100644 --- a/device/esp/esp32c2.go +++ b/device/esp/esp32c2.go @@ -10,7 +10,7 @@ package esp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -157,8 +157,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { case IRQ_WIFI_MAC: diff --git a/device/esp/esp32c3.S b/device/esp/esp32c3.S deleted file mode 100644 index 0395d73..0000000 --- a/device/esp/esp32c3.S +++ /dev/null @@ -1,67 +0,0 @@ -// This is a very minimal bootloader for the ESP32-C3. It only initializes the -// flash and then continues with the generic RISC-V initialization code, which -// in turn will call runtime.main. -// It is written in assembly (and not in a higher level language) to make sure -// it is entirely loaded into IRAM and doesn't accidentally call functions -// stored in IROM. -// -// For reference, here is a nice introduction into RISC-V assembly: -// https://www.imperialviolet.org/2016/12/31/riscv.html - -.section .init -.global call_start_cpu0 -.type call_start_cpu0,@function -call_start_cpu0: - // At this point: - // - The ROM bootloader is finished and has jumped to here. - // - We're running from IRAM: both IRAM and DRAM segments have been loaded - // by the ROM bootloader. - // - We have a usable stack (but not the one we would like to use). - // - No flash mappings (MMU) are set up yet. - - // Reset MMU, see bootloader_reset_mmu in the ESP-IDF. - call Cache_Suspend_ICache - mv s0, a0 // autoload value - call Cache_Invalidate_ICache_All - call Cache_MMU_Init - - // Set up DROM from flash. - // Somehow, this also sets up IROM from flash. Not sure why, but it avoids - // the need for another such call. - // C equivalent: - // Cache_Dbus_MMU_Set(MMU_ACCESS_FLASH, 0x3C00_0000, 0, 64, 128, 0) - li a0, 0 // ext_ram: MMU_ACCESS_FLASH - li a1, 0x3C000000 // vaddr: address in the data bus - li a2, 0 // paddr: physical address in the flash chip - li a3, 64 // psize: always 64 (kilobytes) - li a4, 128 // num: pages to be set (8192K / 64K = 128) - li a5, 0 // fixed - call Cache_Dbus_MMU_Set - - // Enable the flash cache. - mv a0, s0 // restore autoload value from Cache_Suspend_ICache call - call Cache_Resume_ICache - - // Jump to generic RISC-V initialization, which initializes the stack - // pointer and globals register. It should not return. - // (It appears that the linker relaxes this jump and instead inserts the - // _start function right after here). - j _start - -.section .text.exception_vectors -.global _vector_table -.type _vector_table,@function - -_vector_table: - - .option push - .option norvc - - .rept 32 - j handleInterruptASM /* interrupt handler */ - .endr - - .option pop - -.size _vector_table, .-_vector_table - diff --git a/device/esp/esp32c3.go b/device/esp/esp32c3.go index fd94177..0ad2f22 100644 --- a/device/esp/esp32c3.go +++ b/device/esp/esp32c3.go @@ -10,7 +10,7 @@ package esp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -217,8 +217,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { case IRQ_WIFI_MAC: diff --git a/device/esp/esp32c6.go b/device/esp/esp32c6.go index 0542017..84ab2c0 100644 --- a/device/esp/esp32c6.go +++ b/device/esp/esp32c6.go @@ -10,7 +10,7 @@ package esp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -262,8 +262,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { case IRQ_WIFI_MAC: diff --git a/device/esp/esp32c6lp.go b/device/esp/esp32c6lp.go index a19db04..eb4135c 100644 --- a/device/esp/esp32c6lp.go +++ b/device/esp/esp32c6lp.go @@ -10,7 +10,7 @@ package esp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -52,8 +52,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { case IRQ_LP_TIMER: diff --git a/device/esp/esp32h2.go b/device/esp/esp32h2.go index e565c86..f2162eb 100644 --- a/device/esp/esp32h2.go +++ b/device/esp/esp32h2.go @@ -10,7 +10,7 @@ package esp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -226,8 +226,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { case IRQ_PMU: diff --git a/device/esp/esp32p4.go b/device/esp/esp32p4.go index 62d3385..ade5559 100644 --- a/device/esp/esp32p4.go +++ b/device/esp/esp32p4.go @@ -10,7 +10,7 @@ package esp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -316,8 +316,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { case IRQ_LP_WDT: diff --git a/device/esp/esp32s2.go b/device/esp/esp32s2.go index 3d72984..834503f 100644 --- a/device/esp/esp32s2.go +++ b/device/esp/esp32s2.go @@ -10,7 +10,7 @@ package esp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -295,8 +295,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { case IRQ_WIFI_MAC: diff --git a/device/esp/esp32s2ulp.go b/device/esp/esp32s2ulp.go index 9d53590..b1a6003 100644 --- a/device/esp/esp32s2ulp.go +++ b/device/esp/esp32s2ulp.go @@ -10,7 +10,7 @@ package esp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -58,8 +58,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { case IRQ_TOUCH_DONE_INT: diff --git a/device/esp/esp32s3.go b/device/esp/esp32s3.go index 054c0fe..1c00476 100644 --- a/device/esp/esp32s3.go +++ b/device/esp/esp32s3.go @@ -10,7 +10,7 @@ package esp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -313,8 +313,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { case IRQ_WIFI_MAC: diff --git a/device/esp/esp32s3ulp.go b/device/esp/esp32s3ulp.go index b2421fb..c0152a8 100644 --- a/device/esp/esp32s3ulp.go +++ b/device/esp/esp32s3ulp.go @@ -10,7 +10,7 @@ package esp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -67,8 +67,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { case IRQ_TOUCH_DONE_INT: diff --git a/device/esp/esp8266.S b/device/esp/esp8266.S deleted file mode 100644 index cffa503..0000000 --- a/device/esp/esp8266.S +++ /dev/null @@ -1,6 +0,0 @@ - -.section .text.tinygo_scanCurrentStack -.global tinygo_scanCurrentStack -tinygo_scanCurrentStack: - // TODO: save callee saved registers on the stack - j tinygo_scanstack diff --git a/device/esp/esp8266.go b/device/esp/esp8266.go index d07a842..aea7663 100644 --- a/device/esp/esp8266.go +++ b/device/esp/esp8266.go @@ -10,7 +10,7 @@ package esp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -31,8 +31,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { } diff --git a/device/gba/gba.go b/device/gba/gba.go index 8eb4bbc..4bbb51a 100644 --- a/device/gba/gba.go +++ b/device/gba/gba.go @@ -5,7 +5,7 @@ package gba import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) diff --git a/device/kendryte/k210.go b/device/kendryte/k210.go index f5c0334..bd1d749 100644 --- a/device/kendryte/k210.go +++ b/device/kendryte/k210.go @@ -10,7 +10,7 @@ package kendryte import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -223,8 +223,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { case IRQ_SPI0: diff --git a/device/nrf/nrf51.go b/device/nrf/nrf51.go index 5ac513c..21d8b97 100644 --- a/device/nrf/nrf51.go +++ b/device/nrf/nrf51.go @@ -36,7 +36,7 @@ package nrf import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -159,8 +159,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export POWER_CLOCK_IRQHandler func interruptPOWER_CLOCK() { diff --git a/device/nrf/nrf51.s b/device/nrf/nrf51.s deleted file mode 100644 index c4b0ebb..0000000 --- a/device/nrf/nrf51.s +++ /dev/null @@ -1,153 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from nrf51.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk - -/* -// nRF51 reference description for radio MCU with ARM 32-bit Cortex-M0 Microcontroller at 16MHz CPU clock -*/ - -// Copyright (c) 2010 - 2020, Nordic Semiconductor ASA All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of Nordic Semiconductor ASA nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long POWER_CLOCK_IRQHandler - .long RADIO_IRQHandler - .long UART0_IRQHandler - .long SPI0_TWI0_IRQHandler - .long SPI1_TWI1_IRQHandler - .long 0 - .long GPIOTE_IRQHandler - .long ADC_IRQHandler - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long RTC0_IRQHandler - .long TEMP_IRQHandler - .long RNG_IRQHandler - .long ECB_IRQHandler - .long CCM_AAR_IRQHandler - .long WDT_IRQHandler - .long RTC1_IRQHandler - .long QDEC_IRQHandler - .long LPCOMP_IRQHandler - .long SWI0_IRQHandler - .long SWI1_IRQHandler - .long SWI2_IRQHandler - .long SWI3_IRQHandler - .long SWI4_IRQHandler - .long SWI5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ POWER_CLOCK_IRQHandler - IRQ POWER_IRQHandler - IRQ CLOCK_IRQHandler - IRQ RADIO_IRQHandler - IRQ UART0_IRQHandler - IRQ SPI0_TWI0_IRQHandler - IRQ SPI0_IRQHandler - IRQ TWI0_IRQHandler - IRQ SPI1_TWI1_IRQHandler - IRQ SPIS1_IRQHandler - IRQ SPI1_IRQHandler - IRQ TWI1_IRQHandler - IRQ GPIOTE_IRQHandler - IRQ ADC_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER2_IRQHandler - IRQ RTC0_IRQHandler - IRQ TEMP_IRQHandler - IRQ RNG_IRQHandler - IRQ ECB_IRQHandler - IRQ CCM_AAR_IRQHandler - IRQ AAR_IRQHandler - IRQ CCM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC1_IRQHandler - IRQ QDEC_IRQHandler - IRQ LPCOMP_IRQHandler - IRQ SWI0_IRQHandler - IRQ SWI1_IRQHandler - IRQ SWI2_IRQHandler - IRQ SWI3_IRQHandler - IRQ SWI4_IRQHandler - IRQ SWI5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nrf/nrf52.go b/device/nrf/nrf52.go index 51d318b..7e1f485 100644 --- a/device/nrf/nrf52.go +++ b/device/nrf/nrf52.go @@ -36,7 +36,7 @@ package nrf import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -273,8 +273,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export POWER_CLOCK_IRQHandler func interruptPOWER_CLOCK() { diff --git a/device/nrf/nrf52.s b/device/nrf/nrf52.s deleted file mode 100644 index e34971a..0000000 --- a/device/nrf/nrf52.s +++ /dev/null @@ -1,204 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from nrf52.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk - -/* -// nRF52832 reference description for radio MCU with ARM 32-bit Cortex-M4 Microcontroller -*/ - -// Copyright (c) 2010 - 2020, Nordic Semiconductor ASA All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of Nordic Semiconductor ASA nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long POWER_CLOCK_IRQHandler - .long RADIO_IRQHandler - .long UARTE0_UART0_IRQHandler - .long SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler - .long SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler - .long NFCT_IRQHandler - .long GPIOTE_IRQHandler - .long SAADC_IRQHandler - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long RTC0_IRQHandler - .long TEMP_IRQHandler - .long RNG_IRQHandler - .long ECB_IRQHandler - .long CCM_AAR_IRQHandler - .long WDT_IRQHandler - .long RTC1_IRQHandler - .long QDEC_IRQHandler - .long COMP_LPCOMP_IRQHandler - .long SWI0_EGU0_IRQHandler - .long SWI1_EGU1_IRQHandler - .long SWI2_EGU2_IRQHandler - .long SWI3_EGU3_IRQHandler - .long SWI4_EGU4_IRQHandler - .long SWI5_EGU5_IRQHandler - .long TIMER3_IRQHandler - .long TIMER4_IRQHandler - .long PWM0_IRQHandler - .long PDM_IRQHandler - .long 0 - .long 0 - .long MWU_IRQHandler - .long PWM1_IRQHandler - .long PWM2_IRQHandler - .long SPIM2_SPIS2_SPI2_IRQHandler - .long RTC2_IRQHandler - .long I2S_IRQHandler - .long FPU_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ POWER_CLOCK_IRQHandler - IRQ POWER_IRQHandler - IRQ CLOCK_IRQHandler - IRQ RADIO_IRQHandler - IRQ UARTE0_UART0_IRQHandler - IRQ UARTE0_IRQHandler - IRQ UART0_IRQHandler - IRQ SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler - IRQ SPIM0_IRQHandler - IRQ SPIS0_IRQHandler - IRQ TWIM0_IRQHandler - IRQ TWIS0_IRQHandler - IRQ SPI0_IRQHandler - IRQ TWI0_IRQHandler - IRQ SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler - IRQ SPIM1_IRQHandler - IRQ SPIS1_IRQHandler - IRQ TWIM1_IRQHandler - IRQ TWIS1_IRQHandler - IRQ SPI1_IRQHandler - IRQ TWI1_IRQHandler - IRQ NFCT_IRQHandler - IRQ GPIOTE_IRQHandler - IRQ SAADC_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER2_IRQHandler - IRQ RTC0_IRQHandler - IRQ TEMP_IRQHandler - IRQ RNG_IRQHandler - IRQ ECB_IRQHandler - IRQ CCM_AAR_IRQHandler - IRQ CCM_IRQHandler - IRQ AAR_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC1_IRQHandler - IRQ QDEC_IRQHandler - IRQ COMP_LPCOMP_IRQHandler - IRQ COMP_IRQHandler - IRQ LPCOMP_IRQHandler - IRQ SWI0_EGU0_IRQHandler - IRQ SWI0_IRQHandler - IRQ EGU0_IRQHandler - IRQ SWI1_EGU1_IRQHandler - IRQ SWI1_IRQHandler - IRQ EGU1_IRQHandler - IRQ SWI2_EGU2_IRQHandler - IRQ SWI2_IRQHandler - IRQ EGU2_IRQHandler - IRQ SWI3_EGU3_IRQHandler - IRQ SWI3_IRQHandler - IRQ EGU3_IRQHandler - IRQ SWI4_EGU4_IRQHandler - IRQ SWI4_IRQHandler - IRQ EGU4_IRQHandler - IRQ SWI5_EGU5_IRQHandler - IRQ SWI5_IRQHandler - IRQ EGU5_IRQHandler - IRQ TIMER3_IRQHandler - IRQ TIMER4_IRQHandler - IRQ PWM0_IRQHandler - IRQ PDM_IRQHandler - IRQ MWU_IRQHandler - IRQ PWM1_IRQHandler - IRQ PWM2_IRQHandler - IRQ SPIM2_SPIS2_SPI2_IRQHandler - IRQ SPIM2_IRQHandler - IRQ SPIS2_IRQHandler - IRQ SPI2_IRQHandler - IRQ RTC2_IRQHandler - IRQ I2S_IRQHandler - IRQ FPU_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nrf/nrf52805.go b/device/nrf/nrf52805.go index 13c9edd..2bbfed7 100644 --- a/device/nrf/nrf52805.go +++ b/device/nrf/nrf52805.go @@ -36,7 +36,7 @@ package nrf import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -177,8 +177,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export POWER_CLOCK_IRQHandler func interruptPOWER_CLOCK() { diff --git a/device/nrf/nrf52805.s b/device/nrf/nrf52805.s deleted file mode 100644 index 10ab4cb..0000000 --- a/device/nrf/nrf52805.s +++ /dev/null @@ -1,159 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from nrf52805.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk - -/* -// nRF52805 reference description for radio MCU with ARM 32-bit Cortex-M4 Microcontroller -*/ - -// Copyright (c) 2010 - 2020, Nordic Semiconductor ASA All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of Nordic Semiconductor ASA nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long POWER_CLOCK_IRQHandler - .long RADIO_IRQHandler - .long UARTE0_UART0_IRQHandler - .long TWIM0_TWIS0_TWI0_IRQHandler - .long SPIM0_SPIS0_SPI0_IRQHandler - .long 0 - .long GPIOTE_IRQHandler - .long SAADC_IRQHandler - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long RTC0_IRQHandler - .long TEMP_IRQHandler - .long RNG_IRQHandler - .long ECB_IRQHandler - .long CCM_AAR_IRQHandler - .long WDT_IRQHandler - .long RTC1_IRQHandler - .long QDEC_IRQHandler - .long 0 - .long SWI0_EGU0_IRQHandler - .long SWI1_EGU1_IRQHandler - .long SWI2_IRQHandler - .long SWI3_IRQHandler - .long SWI4_IRQHandler - .long SWI5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ POWER_CLOCK_IRQHandler - IRQ CLOCK_IRQHandler - IRQ POWER_IRQHandler - IRQ RADIO_IRQHandler - IRQ UARTE0_UART0_IRQHandler - IRQ UART0_IRQHandler - IRQ UARTE0_IRQHandler - IRQ TWIM0_TWIS0_TWI0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWIM0_IRQHandler - IRQ TWIS0_IRQHandler - IRQ SPIM0_SPIS0_SPI0_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPIM0_IRQHandler - IRQ SPIS0_IRQHandler - IRQ GPIOTE_IRQHandler - IRQ SAADC_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER2_IRQHandler - IRQ RTC0_IRQHandler - IRQ TEMP_IRQHandler - IRQ RNG_IRQHandler - IRQ ECB_IRQHandler - IRQ CCM_AAR_IRQHandler - IRQ AAR_IRQHandler - IRQ CCM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC1_IRQHandler - IRQ QDEC_IRQHandler - IRQ SWI0_EGU0_IRQHandler - IRQ EGU0_IRQHandler - IRQ SWI0_IRQHandler - IRQ SWI1_EGU1_IRQHandler - IRQ EGU1_IRQHandler - IRQ SWI1_IRQHandler - IRQ SWI2_IRQHandler - IRQ SWI3_IRQHandler - IRQ SWI4_IRQHandler - IRQ SWI5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nrf/nrf52810.go b/device/nrf/nrf52810.go index 21ff67c..fa432ac 100644 --- a/device/nrf/nrf52810.go +++ b/device/nrf/nrf52810.go @@ -36,7 +36,7 @@ package nrf import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -186,8 +186,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export POWER_CLOCK_IRQHandler func interruptPOWER_CLOCK() { diff --git a/device/nrf/nrf52810.s b/device/nrf/nrf52810.s deleted file mode 100644 index 873599c..0000000 --- a/device/nrf/nrf52810.s +++ /dev/null @@ -1,166 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from nrf52810.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk - -/* -// nRF52810 reference description for radio MCU with ARM 32-bit Cortex-M4 Microcontroller -*/ - -// Copyright (c) 2010 - 2020, Nordic Semiconductor ASA All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of Nordic Semiconductor ASA nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long POWER_CLOCK_IRQHandler - .long RADIO_IRQHandler - .long UARTE0_UART0_IRQHandler - .long TWIM0_TWIS0_TWI0_IRQHandler - .long SPIM0_SPIS0_SPI0_IRQHandler - .long 0 - .long GPIOTE_IRQHandler - .long SAADC_IRQHandler - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long RTC0_IRQHandler - .long TEMP_IRQHandler - .long RNG_IRQHandler - .long ECB_IRQHandler - .long CCM_AAR_IRQHandler - .long WDT_IRQHandler - .long RTC1_IRQHandler - .long QDEC_IRQHandler - .long COMP_IRQHandler - .long SWI0_EGU0_IRQHandler - .long SWI1_EGU1_IRQHandler - .long SWI2_IRQHandler - .long SWI3_IRQHandler - .long SWI4_IRQHandler - .long SWI5_IRQHandler - .long 0 - .long 0 - .long PWM0_IRQHandler - .long PDM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ POWER_CLOCK_IRQHandler - IRQ CLOCK_IRQHandler - IRQ POWER_IRQHandler - IRQ RADIO_IRQHandler - IRQ UARTE0_UART0_IRQHandler - IRQ UART0_IRQHandler - IRQ UARTE0_IRQHandler - IRQ TWIM0_TWIS0_TWI0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWIM0_IRQHandler - IRQ TWIS0_IRQHandler - IRQ SPIM0_SPIS0_SPI0_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPIM0_IRQHandler - IRQ SPIS0_IRQHandler - IRQ GPIOTE_IRQHandler - IRQ SAADC_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER2_IRQHandler - IRQ RTC0_IRQHandler - IRQ TEMP_IRQHandler - IRQ RNG_IRQHandler - IRQ ECB_IRQHandler - IRQ CCM_AAR_IRQHandler - IRQ AAR_IRQHandler - IRQ CCM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC1_IRQHandler - IRQ QDEC_IRQHandler - IRQ COMP_IRQHandler - IRQ SWI0_EGU0_IRQHandler - IRQ EGU0_IRQHandler - IRQ SWI0_IRQHandler - IRQ SWI1_EGU1_IRQHandler - IRQ EGU1_IRQHandler - IRQ SWI1_IRQHandler - IRQ SWI2_IRQHandler - IRQ SWI3_IRQHandler - IRQ SWI4_IRQHandler - IRQ SWI5_IRQHandler - IRQ PWM0_IRQHandler - IRQ PDM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nrf/nrf52811.go b/device/nrf/nrf52811.go index 6b283f6..d49f498 100644 --- a/device/nrf/nrf52811.go +++ b/device/nrf/nrf52811.go @@ -36,7 +36,7 @@ package nrf import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -195,8 +195,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export POWER_CLOCK_IRQHandler func interruptPOWER_CLOCK() { diff --git a/device/nrf/nrf52811.s b/device/nrf/nrf52811.s deleted file mode 100644 index 145b727..0000000 --- a/device/nrf/nrf52811.s +++ /dev/null @@ -1,169 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from nrf52811.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk - -/* -// nRF52811 reference description for radio MCU with ARM 32-bit Cortex-M4 Microcontroller -*/ - -// Copyright (c) 2010 - 2020, Nordic Semiconductor ASA All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of Nordic Semiconductor ASA nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long POWER_CLOCK_IRQHandler - .long RADIO_IRQHandler - .long UARTE0_UART0_IRQHandler - .long TWIM0_TWIS0_TWI0_SPIM1_SPIS1_SPI1_IRQHandler - .long SPIM0_SPIS0_SPI0_IRQHandler - .long 0 - .long GPIOTE_IRQHandler - .long SAADC_IRQHandler - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long RTC0_IRQHandler - .long TEMP_IRQHandler - .long RNG_IRQHandler - .long ECB_IRQHandler - .long CCM_AAR_IRQHandler - .long WDT_IRQHandler - .long RTC1_IRQHandler - .long QDEC_IRQHandler - .long COMP_IRQHandler - .long SWI0_EGU0_IRQHandler - .long SWI1_EGU1_IRQHandler - .long SWI2_IRQHandler - .long SWI3_IRQHandler - .long SWI4_IRQHandler - .long SWI5_IRQHandler - .long 0 - .long 0 - .long PWM0_IRQHandler - .long PDM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ POWER_CLOCK_IRQHandler - IRQ CLOCK_IRQHandler - IRQ POWER_IRQHandler - IRQ RADIO_IRQHandler - IRQ UARTE0_UART0_IRQHandler - IRQ UART0_IRQHandler - IRQ UARTE0_IRQHandler - IRQ TWIM0_TWIS0_TWI0_SPIM1_SPIS1_SPI1_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPIM1_IRQHandler - IRQ SPIS1_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWIM0_IRQHandler - IRQ TWIS0_IRQHandler - IRQ SPIM0_SPIS0_SPI0_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPIM0_IRQHandler - IRQ SPIS0_IRQHandler - IRQ GPIOTE_IRQHandler - IRQ SAADC_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER2_IRQHandler - IRQ RTC0_IRQHandler - IRQ TEMP_IRQHandler - IRQ RNG_IRQHandler - IRQ ECB_IRQHandler - IRQ CCM_AAR_IRQHandler - IRQ AAR_IRQHandler - IRQ CCM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC1_IRQHandler - IRQ QDEC_IRQHandler - IRQ COMP_IRQHandler - IRQ SWI0_EGU0_IRQHandler - IRQ EGU0_IRQHandler - IRQ SWI0_IRQHandler - IRQ SWI1_EGU1_IRQHandler - IRQ EGU1_IRQHandler - IRQ SWI1_IRQHandler - IRQ SWI2_IRQHandler - IRQ SWI3_IRQHandler - IRQ SWI4_IRQHandler - IRQ SWI5_IRQHandler - IRQ PWM0_IRQHandler - IRQ PDM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nrf/nrf52820.go b/device/nrf/nrf52820.go index 0634860..cdb7273 100644 --- a/device/nrf/nrf52820.go +++ b/device/nrf/nrf52820.go @@ -36,7 +36,7 @@ package nrf import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -225,8 +225,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export POWER_CLOCK_IRQHandler func interruptPOWER_CLOCK() { diff --git a/device/nrf/nrf52820.s b/device/nrf/nrf52820.s deleted file mode 100644 index f99ad45..0000000 --- a/device/nrf/nrf52820.s +++ /dev/null @@ -1,189 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from nrf52820.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk - -/* -// nRF52833 reference description for radio MCU with ARM 32-bit Cortex-M4 Microcontroller -*/ - -// Copyright (c) 2010 - 2020, Nordic Semiconductor ASA All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of Nordic Semiconductor ASA nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long POWER_CLOCK_IRQHandler - .long RADIO_IRQHandler - .long UARTE0_UART0_IRQHandler - .long SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler - .long SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler - .long 0 - .long GPIOTE_IRQHandler - .long 0 - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long RTC0_IRQHandler - .long TEMP_IRQHandler - .long RNG_IRQHandler - .long ECB_IRQHandler - .long CCM_AAR_IRQHandler - .long WDT_IRQHandler - .long RTC1_IRQHandler - .long QDEC_IRQHandler - .long COMP_IRQHandler - .long SWI0_EGU0_IRQHandler - .long SWI1_EGU1_IRQHandler - .long SWI2_EGU2_IRQHandler - .long SWI3_EGU3_IRQHandler - .long SWI4_EGU4_IRQHandler - .long SWI5_EGU5_IRQHandler - .long TIMER3_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long USBD_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ POWER_CLOCK_IRQHandler - IRQ CLOCK_IRQHandler - IRQ POWER_IRQHandler - IRQ RADIO_IRQHandler - IRQ UARTE0_UART0_IRQHandler - IRQ UART0_IRQHandler - IRQ UARTE0_IRQHandler - IRQ SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPIM0_IRQHandler - IRQ SPIS0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWIM0_IRQHandler - IRQ TWIS0_IRQHandler - IRQ SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPIM1_IRQHandler - IRQ SPIS1_IRQHandler - IRQ TWI1_IRQHandler - IRQ TWIM1_IRQHandler - IRQ TWIS1_IRQHandler - IRQ GPIOTE_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER2_IRQHandler - IRQ RTC0_IRQHandler - IRQ TEMP_IRQHandler - IRQ RNG_IRQHandler - IRQ ECB_IRQHandler - IRQ CCM_AAR_IRQHandler - IRQ AAR_IRQHandler - IRQ CCM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC1_IRQHandler - IRQ QDEC_IRQHandler - IRQ COMP_IRQHandler - IRQ SWI0_EGU0_IRQHandler - IRQ EGU0_IRQHandler - IRQ SWI0_IRQHandler - IRQ SWI1_EGU1_IRQHandler - IRQ EGU1_IRQHandler - IRQ SWI1_IRQHandler - IRQ SWI2_EGU2_IRQHandler - IRQ EGU2_IRQHandler - IRQ SWI2_IRQHandler - IRQ SWI3_EGU3_IRQHandler - IRQ EGU3_IRQHandler - IRQ SWI3_IRQHandler - IRQ SWI4_EGU4_IRQHandler - IRQ EGU4_IRQHandler - IRQ SWI4_IRQHandler - IRQ SWI5_EGU5_IRQHandler - IRQ EGU5_IRQHandler - IRQ SWI5_IRQHandler - IRQ TIMER3_IRQHandler - IRQ USBD_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nrf/nrf52833.go b/device/nrf/nrf52833.go index 8d389e9..7737173 100644 --- a/device/nrf/nrf52833.go +++ b/device/nrf/nrf52833.go @@ -36,7 +36,7 @@ package nrf import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -285,8 +285,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export POWER_CLOCK_IRQHandler func interruptPOWER_CLOCK() { diff --git a/device/nrf/nrf52833.s b/device/nrf/nrf52833.s deleted file mode 100644 index cdab041..0000000 --- a/device/nrf/nrf52833.s +++ /dev/null @@ -1,217 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from nrf52833.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk - -/* -// nRF52833 reference description for radio MCU with ARM 32-bit Cortex-M4 Microcontroller -*/ - -// Copyright (c) 2010 - 2020, Nordic Semiconductor ASA All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of Nordic Semiconductor ASA nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long POWER_CLOCK_IRQHandler - .long RADIO_IRQHandler - .long UARTE0_UART0_IRQHandler - .long SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler - .long SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler - .long NFCT_IRQHandler - .long GPIOTE_IRQHandler - .long SAADC_IRQHandler - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long RTC0_IRQHandler - .long TEMP_IRQHandler - .long RNG_IRQHandler - .long ECB_IRQHandler - .long CCM_AAR_IRQHandler - .long WDT_IRQHandler - .long RTC1_IRQHandler - .long QDEC_IRQHandler - .long COMP_LPCOMP_IRQHandler - .long SWI0_EGU0_IRQHandler - .long SWI1_EGU1_IRQHandler - .long SWI2_EGU2_IRQHandler - .long SWI3_EGU3_IRQHandler - .long SWI4_EGU4_IRQHandler - .long SWI5_EGU5_IRQHandler - .long TIMER3_IRQHandler - .long TIMER4_IRQHandler - .long PWM0_IRQHandler - .long PDM_IRQHandler - .long 0 - .long 0 - .long MWU_IRQHandler - .long PWM1_IRQHandler - .long PWM2_IRQHandler - .long SPIM2_SPIS2_SPI2_IRQHandler - .long RTC2_IRQHandler - .long I2S_IRQHandler - .long FPU_IRQHandler - .long USBD_IRQHandler - .long UARTE1_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long PWM3_IRQHandler - .long 0 - .long SPIM3_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ POWER_CLOCK_IRQHandler - IRQ CLOCK_IRQHandler - IRQ POWER_IRQHandler - IRQ RADIO_IRQHandler - IRQ UARTE0_UART0_IRQHandler - IRQ UART0_IRQHandler - IRQ UARTE0_IRQHandler - IRQ SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPIM0_IRQHandler - IRQ SPIS0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWIM0_IRQHandler - IRQ TWIS0_IRQHandler - IRQ SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPIM1_IRQHandler - IRQ SPIS1_IRQHandler - IRQ TWI1_IRQHandler - IRQ TWIM1_IRQHandler - IRQ TWIS1_IRQHandler - IRQ NFCT_IRQHandler - IRQ GPIOTE_IRQHandler - IRQ SAADC_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER2_IRQHandler - IRQ RTC0_IRQHandler - IRQ TEMP_IRQHandler - IRQ RNG_IRQHandler - IRQ ECB_IRQHandler - IRQ CCM_AAR_IRQHandler - IRQ AAR_IRQHandler - IRQ CCM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC1_IRQHandler - IRQ QDEC_IRQHandler - IRQ COMP_LPCOMP_IRQHandler - IRQ COMP_IRQHandler - IRQ LPCOMP_IRQHandler - IRQ SWI0_EGU0_IRQHandler - IRQ EGU0_IRQHandler - IRQ SWI0_IRQHandler - IRQ SWI1_EGU1_IRQHandler - IRQ EGU1_IRQHandler - IRQ SWI1_IRQHandler - IRQ SWI2_EGU2_IRQHandler - IRQ EGU2_IRQHandler - IRQ SWI2_IRQHandler - IRQ SWI3_EGU3_IRQHandler - IRQ EGU3_IRQHandler - IRQ SWI3_IRQHandler - IRQ SWI4_EGU4_IRQHandler - IRQ EGU4_IRQHandler - IRQ SWI4_IRQHandler - IRQ SWI5_EGU5_IRQHandler - IRQ EGU5_IRQHandler - IRQ SWI5_IRQHandler - IRQ TIMER3_IRQHandler - IRQ TIMER4_IRQHandler - IRQ PWM0_IRQHandler - IRQ PDM_IRQHandler - IRQ MWU_IRQHandler - IRQ PWM1_IRQHandler - IRQ PWM2_IRQHandler - IRQ SPIM2_SPIS2_SPI2_IRQHandler - IRQ SPI2_IRQHandler - IRQ SPIM2_IRQHandler - IRQ SPIS2_IRQHandler - IRQ RTC2_IRQHandler - IRQ I2S_IRQHandler - IRQ FPU_IRQHandler - IRQ USBD_IRQHandler - IRQ UARTE1_IRQHandler - IRQ PWM3_IRQHandler - IRQ SPIM3_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nrf/nrf52840.go b/device/nrf/nrf52840.go index 87de2cd..b3fe7e8 100644 --- a/device/nrf/nrf52840.go +++ b/device/nrf/nrf52840.go @@ -36,7 +36,7 @@ package nrf import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -291,8 +291,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export POWER_CLOCK_IRQHandler func interruptPOWER_CLOCK() { diff --git a/device/nrf/nrf52840.s b/device/nrf/nrf52840.s deleted file mode 100644 index 32df6d5..0000000 --- a/device/nrf/nrf52840.s +++ /dev/null @@ -1,219 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from nrf52840.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk - -/* -// nRF52840 reference description for radio MCU with ARM 32-bit Cortex-M4 Microcontroller -*/ - -// Copyright (c) 2010 - 2020, Nordic Semiconductor ASA All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of Nordic Semiconductor ASA nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long POWER_CLOCK_IRQHandler - .long RADIO_IRQHandler - .long UARTE0_UART0_IRQHandler - .long SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler - .long SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler - .long NFCT_IRQHandler - .long GPIOTE_IRQHandler - .long SAADC_IRQHandler - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long RTC0_IRQHandler - .long TEMP_IRQHandler - .long RNG_IRQHandler - .long ECB_IRQHandler - .long CCM_AAR_IRQHandler - .long WDT_IRQHandler - .long RTC1_IRQHandler - .long QDEC_IRQHandler - .long COMP_LPCOMP_IRQHandler - .long SWI0_EGU0_IRQHandler - .long SWI1_EGU1_IRQHandler - .long SWI2_EGU2_IRQHandler - .long SWI3_EGU3_IRQHandler - .long SWI4_EGU4_IRQHandler - .long SWI5_EGU5_IRQHandler - .long TIMER3_IRQHandler - .long TIMER4_IRQHandler - .long PWM0_IRQHandler - .long PDM_IRQHandler - .long 0 - .long 0 - .long MWU_IRQHandler - .long PWM1_IRQHandler - .long PWM2_IRQHandler - .long SPIM2_SPIS2_SPI2_IRQHandler - .long RTC2_IRQHandler - .long I2S_IRQHandler - .long FPU_IRQHandler - .long USBD_IRQHandler - .long UARTE1_IRQHandler - .long QSPI_IRQHandler - .long CRYPTOCELL_IRQHandler - .long 0 - .long 0 - .long PWM3_IRQHandler - .long 0 - .long SPIM3_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ POWER_CLOCK_IRQHandler - IRQ CLOCK_IRQHandler - IRQ POWER_IRQHandler - IRQ RADIO_IRQHandler - IRQ UARTE0_UART0_IRQHandler - IRQ UART0_IRQHandler - IRQ UARTE0_IRQHandler - IRQ SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPIM0_IRQHandler - IRQ SPIS0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWIM0_IRQHandler - IRQ TWIS0_IRQHandler - IRQ SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPIM1_IRQHandler - IRQ SPIS1_IRQHandler - IRQ TWI1_IRQHandler - IRQ TWIM1_IRQHandler - IRQ TWIS1_IRQHandler - IRQ NFCT_IRQHandler - IRQ GPIOTE_IRQHandler - IRQ SAADC_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER2_IRQHandler - IRQ RTC0_IRQHandler - IRQ TEMP_IRQHandler - IRQ RNG_IRQHandler - IRQ ECB_IRQHandler - IRQ CCM_AAR_IRQHandler - IRQ AAR_IRQHandler - IRQ CCM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC1_IRQHandler - IRQ QDEC_IRQHandler - IRQ COMP_LPCOMP_IRQHandler - IRQ COMP_IRQHandler - IRQ LPCOMP_IRQHandler - IRQ SWI0_EGU0_IRQHandler - IRQ EGU0_IRQHandler - IRQ SWI0_IRQHandler - IRQ SWI1_EGU1_IRQHandler - IRQ EGU1_IRQHandler - IRQ SWI1_IRQHandler - IRQ SWI2_EGU2_IRQHandler - IRQ EGU2_IRQHandler - IRQ SWI2_IRQHandler - IRQ SWI3_EGU3_IRQHandler - IRQ EGU3_IRQHandler - IRQ SWI3_IRQHandler - IRQ SWI4_EGU4_IRQHandler - IRQ EGU4_IRQHandler - IRQ SWI4_IRQHandler - IRQ SWI5_EGU5_IRQHandler - IRQ EGU5_IRQHandler - IRQ SWI5_IRQHandler - IRQ TIMER3_IRQHandler - IRQ TIMER4_IRQHandler - IRQ PWM0_IRQHandler - IRQ PDM_IRQHandler - IRQ MWU_IRQHandler - IRQ PWM1_IRQHandler - IRQ PWM2_IRQHandler - IRQ SPIM2_SPIS2_SPI2_IRQHandler - IRQ SPI2_IRQHandler - IRQ SPIM2_IRQHandler - IRQ SPIS2_IRQHandler - IRQ RTC2_IRQHandler - IRQ I2S_IRQHandler - IRQ FPU_IRQHandler - IRQ USBD_IRQHandler - IRQ UARTE1_IRQHandler - IRQ QSPI_IRQHandler - IRQ CRYPTOCELL_IRQHandler - IRQ PWM3_IRQHandler - IRQ SPIM3_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nrf/nrf5340_application.go b/device/nrf/nrf5340_application.go index 5fc9667..2cdcec5 100644 --- a/device/nrf/nrf5340_application.go +++ b/device/nrf/nrf5340_application.go @@ -10,7 +10,7 @@ package nrf import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -493,8 +493,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FPU_IRQHandler func interruptFPU() { diff --git a/device/nrf/nrf5340_application.s b/device/nrf/nrf5340_application.s deleted file mode 100644 index 46ed9fb..0000000 --- a/device/nrf/nrf5340_application.s +++ /dev/null @@ -1,290 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from nrf5340_application.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk - -/* -// nRF53 reference description for system-on-chip with dual ARM 32-bit Cortex-M33 microcontrollers -*/ - -// Copyright (c) 2010 - 2020, Nordic Semiconductor ASA All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of Nordic Semiconductor ASA nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FPU_IRQHandler - .long CACHE_IRQHandler - .long 0 - .long SPU_IRQHandler - .long 0 - .long CLOCK_POWER_IRQHandler - .long 0 - .long 0 - .long SPIM0_SPIS0_TWIM0_TWIS0_UARTE0_IRQHandler - .long SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQHandler - .long SPIM4_IRQHandler - .long SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler - .long SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler - .long GPIOTE0_IRQHandler - .long SAADC_IRQHandler - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long 0 - .long 0 - .long RTC0_IRQHandler - .long RTC1_IRQHandler - .long 0 - .long 0 - .long WDT0_IRQHandler - .long WDT1_IRQHandler - .long COMP_LPCOMP_IRQHandler - .long EGU0_IRQHandler - .long EGU1_IRQHandler - .long EGU2_IRQHandler - .long EGU3_IRQHandler - .long EGU4_IRQHandler - .long EGU5_IRQHandler - .long PWM0_IRQHandler - .long PWM1_IRQHandler - .long PWM2_IRQHandler - .long PWM3_IRQHandler - .long 0 - .long PDM0_IRQHandler - .long 0 - .long I2S0_IRQHandler - .long 0 - .long IPC_IRQHandler - .long QSPI_IRQHandler - .long 0 - .long NFCT_IRQHandler - .long 0 - .long GPIOTE1_IRQHandler - .long 0 - .long 0 - .long 0 - .long QDEC0_IRQHandler - .long QDEC1_IRQHandler - .long 0 - .long USBD_IRQHandler - .long USBREGULATOR_IRQHandler - .long 0 - .long KMU_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CRYPTOCELL_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FPU_IRQHandler - IRQ FPU_NS_IRQHandler - IRQ FPU_S_IRQHandler - IRQ CACHE_IRQHandler - IRQ CACHE_S_IRQHandler - IRQ SPU_IRQHandler - IRQ SPU_S_IRQHandler - IRQ CLOCK_POWER_IRQHandler - IRQ CLOCK_NS_IRQHandler - IRQ POWER_NS_IRQHandler - IRQ CLOCK_S_IRQHandler - IRQ POWER_S_IRQHandler - IRQ SPIM0_SPIS0_TWIM0_TWIS0_UARTE0_IRQHandler - IRQ SPIM0_NS_IRQHandler - IRQ SPIS0_NS_IRQHandler - IRQ TWIM0_NS_IRQHandler - IRQ TWIS0_NS_IRQHandler - IRQ UARTE0_NS_IRQHandler - IRQ SPIM0_S_IRQHandler - IRQ SPIS0_S_IRQHandler - IRQ TWIM0_S_IRQHandler - IRQ TWIS0_S_IRQHandler - IRQ UARTE0_S_IRQHandler - IRQ SPIM1_SPIS1_TWIM1_TWIS1_UARTE1_IRQHandler - IRQ SPIM1_NS_IRQHandler - IRQ SPIS1_NS_IRQHandler - IRQ TWIM1_NS_IRQHandler - IRQ TWIS1_NS_IRQHandler - IRQ UARTE1_NS_IRQHandler - IRQ SPIM1_S_IRQHandler - IRQ SPIS1_S_IRQHandler - IRQ TWIM1_S_IRQHandler - IRQ TWIS1_S_IRQHandler - IRQ UARTE1_S_IRQHandler - IRQ SPIM4_IRQHandler - IRQ SPIM4_NS_IRQHandler - IRQ SPIM4_S_IRQHandler - IRQ SPIM2_SPIS2_TWIM2_TWIS2_UARTE2_IRQHandler - IRQ SPIM2_NS_IRQHandler - IRQ SPIS2_NS_IRQHandler - IRQ TWIM2_NS_IRQHandler - IRQ TWIS2_NS_IRQHandler - IRQ UARTE2_NS_IRQHandler - IRQ SPIM2_S_IRQHandler - IRQ SPIS2_S_IRQHandler - IRQ TWIM2_S_IRQHandler - IRQ TWIS2_S_IRQHandler - IRQ UARTE2_S_IRQHandler - IRQ SPIM3_SPIS3_TWIM3_TWIS3_UARTE3_IRQHandler - IRQ SPIM3_NS_IRQHandler - IRQ SPIS3_NS_IRQHandler - IRQ TWIM3_NS_IRQHandler - IRQ TWIS3_NS_IRQHandler - IRQ UARTE3_NS_IRQHandler - IRQ SPIM3_S_IRQHandler - IRQ SPIS3_S_IRQHandler - IRQ TWIM3_S_IRQHandler - IRQ TWIS3_S_IRQHandler - IRQ UARTE3_S_IRQHandler - IRQ GPIOTE0_IRQHandler - IRQ GPIOTE0_S_IRQHandler - IRQ SAADC_IRQHandler - IRQ SAADC_NS_IRQHandler - IRQ SAADC_S_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER0_NS_IRQHandler - IRQ TIMER0_S_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER1_NS_IRQHandler - IRQ TIMER1_S_IRQHandler - IRQ TIMER2_IRQHandler - IRQ TIMER2_NS_IRQHandler - IRQ TIMER2_S_IRQHandler - IRQ RTC0_IRQHandler - IRQ RTC0_NS_IRQHandler - IRQ RTC0_S_IRQHandler - IRQ RTC1_IRQHandler - IRQ RTC1_NS_IRQHandler - IRQ RTC1_S_IRQHandler - IRQ WDT0_IRQHandler - IRQ WDT0_NS_IRQHandler - IRQ WDT0_S_IRQHandler - IRQ WDT1_IRQHandler - IRQ WDT1_NS_IRQHandler - IRQ WDT1_S_IRQHandler - IRQ COMP_LPCOMP_IRQHandler - IRQ COMP_NS_IRQHandler - IRQ LPCOMP_NS_IRQHandler - IRQ COMP_S_IRQHandler - IRQ LPCOMP_S_IRQHandler - IRQ EGU0_IRQHandler - IRQ EGU0_NS_IRQHandler - IRQ EGU0_S_IRQHandler - IRQ EGU1_IRQHandler - IRQ EGU1_NS_IRQHandler - IRQ EGU1_S_IRQHandler - IRQ EGU2_IRQHandler - IRQ EGU2_NS_IRQHandler - IRQ EGU2_S_IRQHandler - IRQ EGU3_IRQHandler - IRQ EGU3_NS_IRQHandler - IRQ EGU3_S_IRQHandler - IRQ EGU4_IRQHandler - IRQ EGU4_NS_IRQHandler - IRQ EGU4_S_IRQHandler - IRQ EGU5_IRQHandler - IRQ EGU5_NS_IRQHandler - IRQ EGU5_S_IRQHandler - IRQ PWM0_IRQHandler - IRQ PWM0_NS_IRQHandler - IRQ PWM0_S_IRQHandler - IRQ PWM1_IRQHandler - IRQ PWM1_NS_IRQHandler - IRQ PWM1_S_IRQHandler - IRQ PWM2_IRQHandler - IRQ PWM2_NS_IRQHandler - IRQ PWM2_S_IRQHandler - IRQ PWM3_IRQHandler - IRQ PWM3_NS_IRQHandler - IRQ PWM3_S_IRQHandler - IRQ PDM0_IRQHandler - IRQ PDM0_NS_IRQHandler - IRQ PDM0_S_IRQHandler - IRQ I2S0_IRQHandler - IRQ I2S0_NS_IRQHandler - IRQ I2S0_S_IRQHandler - IRQ IPC_IRQHandler - IRQ IPC_NS_IRQHandler - IRQ IPC_S_IRQHandler - IRQ QSPI_IRQHandler - IRQ QSPI_NS_IRQHandler - IRQ QSPI_S_IRQHandler - IRQ NFCT_IRQHandler - IRQ NFCT_NS_IRQHandler - IRQ NFCT_S_IRQHandler - IRQ GPIOTE1_IRQHandler - IRQ GPIOTE1_NS_IRQHandler - IRQ QDEC0_IRQHandler - IRQ QDEC0_NS_IRQHandler - IRQ QDEC0_S_IRQHandler - IRQ QDEC1_IRQHandler - IRQ QDEC1_NS_IRQHandler - IRQ QDEC1_S_IRQHandler - IRQ USBD_IRQHandler - IRQ USBD_NS_IRQHandler - IRQ USBD_S_IRQHandler - IRQ USBREGULATOR_IRQHandler - IRQ USBREGULATOR_NS_IRQHandler - IRQ USBREGULATOR_S_IRQHandler - IRQ KMU_IRQHandler - IRQ KMU_NS_IRQHandler - IRQ KMU_S_IRQHandler - IRQ CRYPTOCELL_IRQHandler - IRQ CRYPTOCELL_S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nrf/nrf5340_network.go b/device/nrf/nrf5340_network.go index 3f86398..943252d 100644 --- a/device/nrf/nrf5340_network.go +++ b/device/nrf/nrf5340_network.go @@ -10,7 +10,7 @@ package nrf import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -169,8 +169,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export CLOCK_POWER_IRQHandler func interruptCLOCK_POWER() { diff --git a/device/nrf/nrf5340_network.s b/device/nrf/nrf5340_network.s deleted file mode 100644 index 8136ed1..0000000 --- a/device/nrf/nrf5340_network.s +++ /dev/null @@ -1,143 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from nrf5340_network.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk - -/* -// nRF53 reference description for system-on-chip with dual ARM 32-bit Cortex-M33 microcontrollers -*/ - -// Copyright (c) 2010 - 2020, Nordic Semiconductor ASA All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of Nordic Semiconductor ASA nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CLOCK_POWER_IRQHandler - .long 0 - .long 0 - .long RADIO_IRQHandler - .long RNG_IRQHandler - .long GPIOTE_IRQHandler - .long WDT_IRQHandler - .long TIMER0_IRQHandler - .long ECB_IRQHandler - .long AAR_CCM_IRQHandler - .long 0 - .long TEMP_IRQHandler - .long RTC0_IRQHandler - .long IPC_IRQHandler - .long SPIM0_SPIS0_TWIM0_TWIS0_UARTE0_IRQHandler - .long EGU0_IRQHandler - .long 0 - .long RTC1_IRQHandler - .long 0 - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long SWI0_IRQHandler - .long SWI1_IRQHandler - .long SWI2_IRQHandler - .long SWI3_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ CLOCK_POWER_IRQHandler - IRQ CLOCK_NS_IRQHandler - IRQ POWER_NS_IRQHandler - IRQ RADIO_IRQHandler - IRQ RADIO_NS_IRQHandler - IRQ RNG_IRQHandler - IRQ RNG_NS_IRQHandler - IRQ GPIOTE_IRQHandler - IRQ GPIOTE_NS_IRQHandler - IRQ WDT_IRQHandler - IRQ WDT_NS_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER0_NS_IRQHandler - IRQ ECB_IRQHandler - IRQ ECB_NS_IRQHandler - IRQ AAR_CCM_IRQHandler - IRQ AAR_NS_IRQHandler - IRQ CCM_NS_IRQHandler - IRQ TEMP_IRQHandler - IRQ TEMP_NS_IRQHandler - IRQ RTC0_IRQHandler - IRQ RTC0_NS_IRQHandler - IRQ IPC_IRQHandler - IRQ IPC_NS_IRQHandler - IRQ SPIM0_SPIS0_TWIM0_TWIS0_UARTE0_IRQHandler - IRQ SPIM0_NS_IRQHandler - IRQ SPIS0_NS_IRQHandler - IRQ TWIM0_NS_IRQHandler - IRQ TWIS0_NS_IRQHandler - IRQ UARTE0_NS_IRQHandler - IRQ EGU0_IRQHandler - IRQ EGU0_NS_IRQHandler - IRQ RTC1_IRQHandler - IRQ RTC1_NS_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER1_NS_IRQHandler - IRQ TIMER2_IRQHandler - IRQ TIMER2_NS_IRQHandler - IRQ SWI0_IRQHandler - IRQ SWI0_NS_IRQHandler - IRQ SWI1_IRQHandler - IRQ SWI1_NS_IRQHandler - IRQ SWI2_IRQHandler - IRQ SWI2_NS_IRQHandler - IRQ SWI3_IRQHandler - IRQ SWI3_NS_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nrf/nrf9160.go b/device/nrf/nrf9160.go index b26d9e2..e97bbda 100644 --- a/device/nrf/nrf9160.go +++ b/device/nrf/nrf9160.go @@ -36,7 +36,7 @@ package nrf import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -426,8 +426,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SPU_IRQHandler func interruptSPU() { diff --git a/device/nrf/nrf9160.s b/device/nrf/nrf9160.s deleted file mode 100644 index f19ab65..0000000 --- a/device/nrf/nrf9160.s +++ /dev/null @@ -1,281 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from nrf9160.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk - -/* -// nrf9160 reference description for radio MCU with ARM 32-bit Cortex-M33 Microcontroller -*/ - -// Copyright (c) 2010 - 2020, Nordic Semiconductor ASA All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of Nordic Semiconductor ASA nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long SPU_IRQHandler - .long 0 - .long CLOCK_POWER_IRQHandler - .long 0 - .long 0 - .long UARTE0_SPIM0_SPIS0_TWIM0_TWIS0_IRQHandler - .long UARTE1_SPIM1_SPIS1_TWIM1_TWIS1_IRQHandler - .long UARTE2_SPIM2_SPIS2_TWIM2_TWIS2_IRQHandler - .long UARTE3_SPIM3_SPIS3_TWIM3_TWIS3_IRQHandler - .long 0 - .long GPIOTE0_IRQHandler - .long SAADC_IRQHandler - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long 0 - .long 0 - .long RTC0_IRQHandler - .long RTC1_IRQHandler - .long 0 - .long 0 - .long WDT_IRQHandler - .long 0 - .long 0 - .long EGU0_IRQHandler - .long EGU1_IRQHandler - .long EGU2_IRQHandler - .long EGU3_IRQHandler - .long EGU4_IRQHandler - .long EGU5_IRQHandler - .long PWM0_IRQHandler - .long PWM1_IRQHandler - .long PWM2_IRQHandler - .long PWM3_IRQHandler - .long 0 - .long PDM_IRQHandler - .long 0 - .long I2S_IRQHandler - .long 0 - .long IPC_IRQHandler - .long 0 - .long FPU_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long GPIOTE1_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long KMU_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CRYPTOCELL_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SPU_IRQHandler - IRQ SPU_S_IRQHandler - IRQ CLOCK_POWER_IRQHandler - IRQ CLOCK_NS_IRQHandler - IRQ POWER_NS_IRQHandler - IRQ CLOCK_S_IRQHandler - IRQ POWER_S_IRQHandler - IRQ UARTE0_SPIM0_SPIS0_TWIM0_TWIS0_IRQHandler - IRQ SPIM0_NS_IRQHandler - IRQ SPIS0_NS_IRQHandler - IRQ TWIM0_NS_IRQHandler - IRQ TWIS0_NS_IRQHandler - IRQ UARTE0_NS_IRQHandler - IRQ SPIM0_S_IRQHandler - IRQ SPIS0_S_IRQHandler - IRQ TWIM0_S_IRQHandler - IRQ TWIS0_S_IRQHandler - IRQ UARTE0_S_IRQHandler - IRQ UARTE1_SPIM1_SPIS1_TWIM1_TWIS1_IRQHandler - IRQ SPIM1_NS_IRQHandler - IRQ SPIS1_NS_IRQHandler - IRQ TWIM1_NS_IRQHandler - IRQ TWIS1_NS_IRQHandler - IRQ UARTE1_NS_IRQHandler - IRQ SPIM1_S_IRQHandler - IRQ SPIS1_S_IRQHandler - IRQ TWIM1_S_IRQHandler - IRQ TWIS1_S_IRQHandler - IRQ UARTE1_S_IRQHandler - IRQ UARTE2_SPIM2_SPIS2_TWIM2_TWIS2_IRQHandler - IRQ SPIM2_NS_IRQHandler - IRQ SPIS2_NS_IRQHandler - IRQ TWIM2_NS_IRQHandler - IRQ TWIS2_NS_IRQHandler - IRQ UARTE2_NS_IRQHandler - IRQ SPIM2_S_IRQHandler - IRQ SPIS2_S_IRQHandler - IRQ TWIM2_S_IRQHandler - IRQ TWIS2_S_IRQHandler - IRQ UARTE2_S_IRQHandler - IRQ UARTE3_SPIM3_SPIS3_TWIM3_TWIS3_IRQHandler - IRQ SPIM3_NS_IRQHandler - IRQ SPIS3_NS_IRQHandler - IRQ TWIM3_NS_IRQHandler - IRQ TWIS3_NS_IRQHandler - IRQ UARTE3_NS_IRQHandler - IRQ SPIM3_S_IRQHandler - IRQ SPIS3_S_IRQHandler - IRQ TWIM3_S_IRQHandler - IRQ TWIS3_S_IRQHandler - IRQ UARTE3_S_IRQHandler - IRQ GPIOTE0_IRQHandler - IRQ GPIOTE0_S_IRQHandler - IRQ SAADC_IRQHandler - IRQ SAADC_NS_IRQHandler - IRQ SAADC_S_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER0_NS_IRQHandler - IRQ TIMER0_S_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER1_NS_IRQHandler - IRQ TIMER1_S_IRQHandler - IRQ TIMER2_IRQHandler - IRQ TIMER2_NS_IRQHandler - IRQ TIMER2_S_IRQHandler - IRQ RTC0_IRQHandler - IRQ RTC0_NS_IRQHandler - IRQ RTC0_S_IRQHandler - IRQ RTC1_IRQHandler - IRQ RTC1_NS_IRQHandler - IRQ RTC1_S_IRQHandler - IRQ WDT_IRQHandler - IRQ WDT_NS_IRQHandler - IRQ WDT_S_IRQHandler - IRQ EGU0_IRQHandler - IRQ EGU0_NS_IRQHandler - IRQ EGU0_S_IRQHandler - IRQ EGU1_IRQHandler - IRQ EGU1_NS_IRQHandler - IRQ EGU1_S_IRQHandler - IRQ EGU2_IRQHandler - IRQ EGU2_NS_IRQHandler - IRQ EGU2_S_IRQHandler - IRQ EGU3_IRQHandler - IRQ EGU3_NS_IRQHandler - IRQ EGU3_S_IRQHandler - IRQ EGU4_IRQHandler - IRQ EGU4_NS_IRQHandler - IRQ EGU4_S_IRQHandler - IRQ EGU5_IRQHandler - IRQ EGU5_NS_IRQHandler - IRQ EGU5_S_IRQHandler - IRQ PWM0_IRQHandler - IRQ PWM0_NS_IRQHandler - IRQ PWM0_S_IRQHandler - IRQ PWM1_IRQHandler - IRQ PWM1_NS_IRQHandler - IRQ PWM1_S_IRQHandler - IRQ PWM2_IRQHandler - IRQ PWM2_NS_IRQHandler - IRQ PWM2_S_IRQHandler - IRQ PWM3_IRQHandler - IRQ PWM3_NS_IRQHandler - IRQ PWM3_S_IRQHandler - IRQ PDM_IRQHandler - IRQ PDM_NS_IRQHandler - IRQ PDM_S_IRQHandler - IRQ I2S_IRQHandler - IRQ I2S_NS_IRQHandler - IRQ I2S_S_IRQHandler - IRQ IPC_IRQHandler - IRQ IPC_NS_IRQHandler - IRQ IPC_S_IRQHandler - IRQ FPU_IRQHandler - IRQ FPU_NS_IRQHandler - IRQ FPU_S_IRQHandler - IRQ GPIOTE1_IRQHandler - IRQ GPIOTE1_NS_IRQHandler - IRQ KMU_IRQHandler - IRQ KMU_NS_IRQHandler - IRQ KMU_S_IRQHandler - IRQ CRYPTOCELL_IRQHandler - IRQ CRYPTOCELL_S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc1102_04.go b/device/nxp/lpc1102_04.go index 9bfae59..f1c71ef 100644 --- a/device/nxp/lpc1102_04.go +++ b/device/nxp/lpc1102_04.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -83,8 +83,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PIO0_0_IRQHandler func interruptPIO0_0() { diff --git a/device/nxp/lpc1102_04.s b/device/nxp/lpc1102_04.s deleted file mode 100644 index 1f95c53..0000000 --- a/device/nxp/lpc1102_04.s +++ /dev/null @@ -1,117 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC1102_4_v4.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC1102/04 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PIO0_0_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PIO0_8_IRQHandler - .long PIO0_9_IRQHandler - .long PIO0_10_IRQHandler - .long PIO0_11_IRQHandler - .long PIO1_0_IRQHandler - .long 0 - .long 0 - .long 0 - .long CT16B0_IRQHandler - .long CT16B1_IRQHandler - .long CT32B0_IRQHandler - .long CT32B1_IRQHandler - .long SPI0_IRQHandler - .long UART_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long WDT_IRQHandler - .long BOD_IRQHandler - .long FMC_IRQHandler - .long 0 - .long 0 - .long GPIO1_IRQHandler - .long GPIO0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PIO0_0_IRQHandler - IRQ PIO0_8_IRQHandler - IRQ PIO0_9_IRQHandler - IRQ PIO0_10_IRQHandler - IRQ PIO0_11_IRQHandler - IRQ PIO1_0_IRQHandler - IRQ CT16B0_IRQHandler - IRQ CT16B1_IRQHandler - IRQ CT32B0_IRQHandler - IRQ CT32B1_IRQHandler - IRQ SPI0_IRQHandler - IRQ UART_IRQHandler - IRQ ADC_IRQHandler - IRQ WDT_IRQHandler - IRQ BOD_IRQHandler - IRQ FMC_IRQHandler - IRQ GPIO1_IRQHandler - IRQ GPIO0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc111x_lpc11cxx.go b/device/nxp/lpc111x_lpc11cxx.go index fce2043..4f99b0d 100644 --- a/device/nxp/lpc111x_lpc11cxx.go +++ b/device/nxp/lpc111x_lpc11cxx.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -115,8 +115,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PIO0_0_IRQHandler func interruptPIO0_0() { diff --git a/device/nxp/lpc111x_lpc11cxx.s b/device/nxp/lpc111x_lpc11cxx.s deleted file mode 100644 index 1d5e023..0000000 --- a/device/nxp/lpc111x_lpc11cxx.s +++ /dev/null @@ -1,129 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC11xx_v6a.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC11xx, LPC11Cxx, LPC11xxL, LPC11xxXL -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PIO0_0_IRQHandler - .long PIO0_1_IRQHandler - .long PIO0_2_IRQHandler - .long PIO0_3_IRQHandler - .long PIO0_4_IRQHandler - .long PIO0_5_IRQHandler - .long PIO0_6_IRQHandler - .long PIO0_7_IRQHandler - .long PIO0_8_IRQHandler - .long PIO0_9_IRQHandler - .long PIO0_10_IRQHandler - .long PIO0_11_IRQHandler - .long PIO1_0_IRQHandler - .long C_CAN_IRQHandler - .long SPI1_IRQHandler - .long I2C_IRQHandler - .long CT16B0_IRQHandler - .long CT16B1_IRQHandler - .long CT32B0_IRQHandler - .long CT32B1_IRQHandler - .long SPI0_IRQHandler - .long UART_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long WDT_IRQHandler - .long BOD_IRQHandler - .long FMC_IRQHandler - .long GPIO3_IRQHandler - .long GPIO2_IRQHandler - .long GPIO1_IRQHandler - .long GPIO0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PIO0_0_IRQHandler - IRQ PIO0_1_IRQHandler - IRQ PIO0_2_IRQHandler - IRQ PIO0_3_IRQHandler - IRQ PIO0_4_IRQHandler - IRQ PIO0_5_IRQHandler - IRQ PIO0_6_IRQHandler - IRQ PIO0_7_IRQHandler - IRQ PIO0_8_IRQHandler - IRQ PIO0_9_IRQHandler - IRQ PIO0_10_IRQHandler - IRQ PIO0_11_IRQHandler - IRQ PIO1_0_IRQHandler - IRQ C_CAN_IRQHandler - IRQ SPI1_IRQHandler - IRQ I2C_IRQHandler - IRQ CT16B0_IRQHandler - IRQ CT16B1_IRQHandler - IRQ CT32B0_IRQHandler - IRQ CT32B1_IRQHandler - IRQ SPI0_IRQHandler - IRQ UART_IRQHandler - IRQ ADC_IRQHandler - IRQ WDT_IRQHandler - IRQ BOD_IRQHandler - IRQ FMC_IRQHandler - IRQ GPIO3_IRQHandler - IRQ GPIO2_IRQHandler - IRQ GPIO1_IRQHandler - IRQ GPIO0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc11axx.go b/device/nxp/lpc11axx.go index 32f04b7..e08c344 100644 --- a/device/nxp/lpc11axx.go +++ b/device/nxp/lpc11axx.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -123,8 +123,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PIN_INT0_IRQHandler func interruptPIN_INT0() { diff --git a/device/nxp/lpc11axx.s b/device/nxp/lpc11axx.s deleted file mode 100644 index b13325f..0000000 --- a/device/nxp/lpc11axx.s +++ /dev/null @@ -1,131 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC11Axxv0.6.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC11Axx -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PIN_INT0_IRQHandler - .long PIN_INT1_IRQHandler - .long PIN_INT2_IRQHandler - .long PIN_INT3_IRQHandler - .long PIN_INT4_IRQHandler - .long PIN_INT5_IRQHandler - .long PIN_INT6_IRQHandler - .long PIN_INT7_IRQHandler - .long GINT0_IRQHandler - .long GINT1_IRQHandler - .long CMP_IRQHandler - .long DAC_IRQHandler - .long RESERVED0_IRQHandler - .long RESERVED1_IRQHandler - .long SSP1_IRQHandler - .long I2C_IRQHandler - .long CT16B0_IRQHandler - .long CT16B1_IRQHandler - .long CT32B0_IRQHandler - .long CT32B1_IRQHandler - .long SSP0_IRQHandler - .long USART_IRQHandler - .long RESERVED2_IRQHandler - .long RESERVED3_IRQHandler - .long ADC_IRQHandler - .long WDT_IRQHandler - .long BOD_IRQHandler - .long FMC_IRQHandler - .long RESERVED4_IRQHandler - .long RESERVED5_IRQHandler - .long RESERVED6_IRQHandler - .long RESERVED7_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PIN_INT0_IRQHandler - IRQ PIN_INT1_IRQHandler - IRQ PIN_INT2_IRQHandler - IRQ PIN_INT3_IRQHandler - IRQ PIN_INT4_IRQHandler - IRQ PIN_INT5_IRQHandler - IRQ PIN_INT6_IRQHandler - IRQ PIN_INT7_IRQHandler - IRQ GINT0_IRQHandler - IRQ GINT1_IRQHandler - IRQ CMP_IRQHandler - IRQ DAC_IRQHandler - IRQ RESERVED0_IRQHandler - IRQ RESERVED1_IRQHandler - IRQ SSP1_IRQHandler - IRQ I2C_IRQHandler - IRQ CT16B0_IRQHandler - IRQ CT16B1_IRQHandler - IRQ CT32B0_IRQHandler - IRQ CT32B1_IRQHandler - IRQ SSP0_IRQHandler - IRQ USART_IRQHandler - IRQ RESERVED2_IRQHandler - IRQ RESERVED3_IRQHandler - IRQ ADC_IRQHandler - IRQ WDT_IRQHandler - IRQ BOD_IRQHandler - IRQ FMC_IRQHandler - IRQ RESERVED4_IRQHandler - IRQ RESERVED5_IRQHandler - IRQ RESERVED6_IRQHandler - IRQ RESERVED7_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc11cxx.go b/device/nxp/lpc11cxx.go index e8ce0a7..491feac 100644 --- a/device/nxp/lpc11cxx.go +++ b/device/nxp/lpc11cxx.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -115,8 +115,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PIO0_0_IRQHandler func interruptPIO0_0() { diff --git a/device/nxp/lpc11cxx.s b/device/nxp/lpc11cxx.s deleted file mode 100644 index 43b1413..0000000 --- a/device/nxp/lpc11cxx.s +++ /dev/null @@ -1,129 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC11Cxx_v9.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC11Cxx -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PIO0_0_IRQHandler - .long PIO0_1_IRQHandler - .long PIO0_2_IRQHandler - .long PIO0_3_IRQHandler - .long PIO0_4_IRQHandler - .long PIO0_5_IRQHandler - .long PIO0_6_IRQHandler - .long PIO0_7_IRQHandler - .long PIO0_8_IRQHandler - .long PIO0_9_IRQHandler - .long PIO0_10_IRQHandler - .long PIO0_11_IRQHandler - .long PIO1_0_IRQHandler - .long C_CAN_IRQHandler - .long SPI1_IRQHandler - .long I2C_IRQHandler - .long CT16B0_IRQHandler - .long CT16B1_IRQHandler - .long CT32B0_IRQHandler - .long CT32B1_IRQHandler - .long SPI0_IRQHandler - .long UART_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long WDT_IRQHandler - .long BOD_IRQHandler - .long FMC_IRQHandler - .long GPIO3_IRQHandler - .long GPIO2_IRQHandler - .long GPIO1_IRQHandler - .long GPIO0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PIO0_0_IRQHandler - IRQ PIO0_1_IRQHandler - IRQ PIO0_2_IRQHandler - IRQ PIO0_3_IRQHandler - IRQ PIO0_4_IRQHandler - IRQ PIO0_5_IRQHandler - IRQ PIO0_6_IRQHandler - IRQ PIO0_7_IRQHandler - IRQ PIO0_8_IRQHandler - IRQ PIO0_9_IRQHandler - IRQ PIO0_10_IRQHandler - IRQ PIO0_11_IRQHandler - IRQ PIO1_0_IRQHandler - IRQ C_CAN_IRQHandler - IRQ SPI1_IRQHandler - IRQ I2C_IRQHandler - IRQ CT16B0_IRQHandler - IRQ CT16B1_IRQHandler - IRQ CT32B0_IRQHandler - IRQ CT32B1_IRQHandler - IRQ SPI0_IRQHandler - IRQ UART_IRQHandler - IRQ ADC_IRQHandler - IRQ WDT_IRQHandler - IRQ BOD_IRQHandler - IRQ FMC_IRQHandler - IRQ GPIO3_IRQHandler - IRQ GPIO2_IRQHandler - IRQ GPIO1_IRQHandler - IRQ GPIO0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc11d14.go b/device/nxp/lpc11d14.go index 29231a4..36ca6ca 100644 --- a/device/nxp/lpc11d14.go +++ b/device/nxp/lpc11d14.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -109,8 +109,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PIO0_0_IRQHandler func interruptPIO0_0() { diff --git a/device/nxp/lpc11d14.s b/device/nxp/lpc11d14.s deleted file mode 100644 index 5a483ec..0000000 --- a/device/nxp/lpc11d14.s +++ /dev/null @@ -1,128 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC11D14_svd_v4.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC11D14 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PIO0_0_IRQHandler - .long PIO0_1_IRQHandler - .long PIO0_2_IRQHandler - .long PIO0_3_IRQHandler - .long PIO0_4_IRQHandler - .long PIO0_5_IRQHandler - .long PIO0_6_IRQHandler - .long PIO0_7_IRQHandler - .long PIO0_8_IRQHandler - .long PIO0_9_IRQHandler - .long PIO0_10_IRQHandler - .long PIO0_11_IRQHandler - .long PIO1_0_IRQHandler - .long 0 - .long SPI1_IRQHandler - .long I2C_IRQHandler - .long CT16B0_IRQHandler - .long CT16B1_IRQHandler - .long CT32B0_IRQHandler - .long CT32B1_IRQHandler - .long SPI0_IRQHandler - .long UART_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long WDT_IRQHandler - .long BOD_IRQHandler - .long FMC_IRQHandler - .long GPIO3_IRQHandler - .long GPIO2_IRQHandler - .long GPIO1_IRQHandler - .long GPIO0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PIO0_0_IRQHandler - IRQ PIO0_1_IRQHandler - IRQ PIO0_2_IRQHandler - IRQ PIO0_3_IRQHandler - IRQ PIO0_4_IRQHandler - IRQ PIO0_5_IRQHandler - IRQ PIO0_6_IRQHandler - IRQ PIO0_7_IRQHandler - IRQ PIO0_8_IRQHandler - IRQ PIO0_9_IRQHandler - IRQ PIO0_10_IRQHandler - IRQ PIO0_11_IRQHandler - IRQ PIO1_0_IRQHandler - IRQ SPI1_IRQHandler - IRQ I2C_IRQHandler - IRQ CT16B0_IRQHandler - IRQ CT16B1_IRQHandler - IRQ CT32B0_IRQHandler - IRQ CT32B1_IRQHandler - IRQ SPI0_IRQHandler - IRQ UART_IRQHandler - IRQ ADC_IRQHandler - IRQ WDT_IRQHandler - IRQ BOD_IRQHandler - IRQ FMC_IRQHandler - IRQ GPIO3_IRQHandler - IRQ GPIO2_IRQHandler - IRQ GPIO1_IRQHandler - IRQ GPIO0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc11e6x.go b/device/nxp/lpc11e6x.go index 557712a..a3651a3 100644 --- a/device/nxp/lpc11e6x.go +++ b/device/nxp/lpc11e6x.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -112,8 +112,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PIN_INT0_IRQHandler func interruptPIN_INT0() { diff --git a/device/nxp/lpc11e6x.s b/device/nxp/lpc11e6x.s deleted file mode 100644 index 0adc1a9..0000000 --- a/device/nxp/lpc11e6x.s +++ /dev/null @@ -1,123 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC11E6x_v0.8.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC11E6x ARM cortex-m0+ -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PIN_INT0_IRQHandler - .long PIN_INT1_IRQHandler - .long PIN_INT2_IRQHandler - .long PIN_INT3_IRQHandler - .long PIN_INT4_IRQHandler - .long PIN_INT5_IRQHandler - .long PIN_INT6_IRQHandler - .long PIN_INT7_IRQHandler - .long GINT0_IRQHandler - .long GINT1_IRQHandler - .long I2C1_IRQHandler - .long USART1_4_IRQHandler - .long USART2_3_IRQHandler - .long SCT0_1_IRQHandler - .long SSP1_IRQHandler - .long I2C0_IRQHandler - .long CT16B0_IRQHandler - .long CT16B1_IRQHandler - .long CT32B0_IRQHandler - .long CT32B1_IRQHandler - .long SSP0_IRQHandler - .long USART_IRQHandler - .long 0 - .long 0 - .long ADC_A_IRQHandler - .long RTC_IRQHandler - .long BOD_WDT_IRQHandler - .long FLASH_IRQHandler - .long DMA_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PIN_INT0_IRQHandler - IRQ PIN_INT1_IRQHandler - IRQ PIN_INT2_IRQHandler - IRQ PIN_INT3_IRQHandler - IRQ PIN_INT4_IRQHandler - IRQ PIN_INT5_IRQHandler - IRQ PIN_INT6_IRQHandler - IRQ PIN_INT7_IRQHandler - IRQ GINT0_IRQHandler - IRQ GINT1_IRQHandler - IRQ I2C1_IRQHandler - IRQ USART1_4_IRQHandler - IRQ USART2_3_IRQHandler - IRQ SCT0_1_IRQHandler - IRQ SSP1_IRQHandler - IRQ I2C0_IRQHandler - IRQ CT16B0_IRQHandler - IRQ CT16B1_IRQHandler - IRQ CT32B0_IRQHandler - IRQ CT32B1_IRQHandler - IRQ SSP0_IRQHandler - IRQ USART_IRQHandler - IRQ ADC_A_IRQHandler - IRQ RTC_IRQHandler - IRQ BOD_WDT_IRQHandler - IRQ FLASH_IRQHandler - IRQ DMA_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc11exx.go b/device/nxp/lpc11exx.go index e52db50..cae9478 100644 --- a/device/nxp/lpc11exx.go +++ b/device/nxp/lpc11exx.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -92,8 +92,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PIN_INT0_IRQHandler func interruptPIN_INT0() { diff --git a/device/nxp/lpc11exx.s b/device/nxp/lpc11exx.s deleted file mode 100644 index 342be7c..0000000 --- a/device/nxp/lpc11exx.s +++ /dev/null @@ -1,116 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC11Exx_v5.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC11Exx 32-bit ARM Cortex-M0 microcontroller; up to 32 kB flash; up to 10 kB SRAM and 4 kB EEPROM; USART -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PIN_INT0_IRQHandler - .long PIN_INT1_IRQHandler - .long PIN_INT2_IRQHandler - .long PIN_INT3_IRQHandler - .long PIN_INT4_IRQHandler - .long PIN_INT5_IRQHandler - .long PIN_INT6_IRQHandler - .long PIN_INT7_IRQHandler - .long GINT0_IRQHandler - .long GINT1_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long SSP1_IRQHandler - .long I2C_IRQHandler - .long CT16B0_IRQHandler - .long CT16B1_IRQHandler - .long CT32B0_IRQHandler - .long CT32B1_IRQHandler - .long SSP0_IRQHandler - .long USART_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long WDT_IRQHandler - .long 0 - .long FLASH_IRQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PIN_INT0_IRQHandler - IRQ PIN_INT1_IRQHandler - IRQ PIN_INT2_IRQHandler - IRQ PIN_INT3_IRQHandler - IRQ PIN_INT4_IRQHandler - IRQ PIN_INT5_IRQHandler - IRQ PIN_INT6_IRQHandler - IRQ PIN_INT7_IRQHandler - IRQ GINT0_IRQHandler - IRQ GINT1_IRQHandler - IRQ SSP1_IRQHandler - IRQ I2C_IRQHandler - IRQ CT16B0_IRQHandler - IRQ CT16B1_IRQHandler - IRQ CT32B0_IRQHandler - IRQ CT32B1_IRQHandler - IRQ SSP0_IRQHandler - IRQ USART_IRQHandler - IRQ ADC_IRQHandler - IRQ WDT_IRQHandler - IRQ FLASH_IRQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc11uxx.go b/device/nxp/lpc11uxx.go index a269dde..2ea5397 100644 --- a/device/nxp/lpc11uxx.go +++ b/device/nxp/lpc11uxx.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -104,8 +104,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PIN_INT0_IRQHandler func interruptPIN_INT0() { diff --git a/device/nxp/lpc11uxx.s b/device/nxp/lpc11uxx.s deleted file mode 100644 index 044ccb9..0000000 --- a/device/nxp/lpc11uxx.s +++ /dev/null @@ -1,123 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC11Uxx_v7.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC11Uxx -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PIN_INT0_IRQHandler - .long PIN_INT1_IRQHandler - .long PIN_INT2_IRQHandler - .long PIN_INT3_IRQHandler - .long PIN_INT4_IRQHandler - .long PIN_INT5_IRQHandler - .long PIN_INT6_IRQHandler - .long PIN_INT7_IRQHandler - .long GINT0_IRQHandler - .long GINT1_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long SSP1_IRQHandler - .long I2C_IRQHandler - .long CT16B0_IRQHandler - .long CT16B1_IRQHandler - .long CT32B0_IRQHandler - .long CT32B1_IRQHandler - .long SSP0_IRQHandler - .long USART_IRQHandler - .long USB_IRQ_IRQHandler - .long USB_FIQ_IRQHandler - .long ADC_IRQHandler - .long WDT_IRQHandler - .long BOD_IRQ_IRQHandler - .long FLASH_IRQ_IRQHandler - .long 0 - .long 0 - .long USBWAKEUP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PIN_INT0_IRQHandler - IRQ PIN_INT1_IRQHandler - IRQ PIN_INT2_IRQHandler - IRQ PIN_INT3_IRQHandler - IRQ PIN_INT4_IRQHandler - IRQ PIN_INT5_IRQHandler - IRQ PIN_INT6_IRQHandler - IRQ PIN_INT7_IRQHandler - IRQ GINT0_IRQHandler - IRQ GINT1_IRQHandler - IRQ SSP1_IRQHandler - IRQ I2C_IRQHandler - IRQ CT16B0_IRQHandler - IRQ CT16B1_IRQHandler - IRQ CT32B0_IRQHandler - IRQ CT32B1_IRQHandler - IRQ SSP0_IRQHandler - IRQ USART_IRQHandler - IRQ USB_IRQ_IRQHandler - IRQ USB_FIQ_IRQHandler - IRQ ADC_IRQHandler - IRQ WDT_IRQHandler - IRQ BOD_IRQ_IRQHandler - IRQ FLASH_IRQ_IRQHandler - IRQ USBWAKEUP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc13uxx.go b/device/nxp/lpc13uxx.go index 8bf4d09..84f828d 100644 --- a/device/nxp/lpc13uxx.go +++ b/device/nxp/lpc13uxx.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -107,8 +107,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PIN_INT0_IRQHandler func interruptPIN_INT0() { diff --git a/device/nxp/lpc13uxx.s b/device/nxp/lpc13uxx.s deleted file mode 100644 index c1ee00a..0000000 --- a/device/nxp/lpc13uxx.s +++ /dev/null @@ -1,124 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC13Uxx_v1.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC1315/16/17/35/36/37 Cortex-M3 MCU; up to 64 kB flash; up to 12 kB SRAM; USB device; USART; EEPROM -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PIN_INT0_IRQHandler - .long PIN_INT1_IRQHandler - .long PIN_INT2_IRQHandler - .long PIN_INT3_IRQHandler - .long PIN_INT4_IRQHandler - .long PIN_INT5_IRQHandler - .long PIN_INT6_IRQHandler - .long PIN_INT7_IRQHandler - .long GINT0_IRQHandler - .long GINT1_IRQHandler - .long 0 - .long 0 - .long RIT_IRQ_IRQHandler - .long 0 - .long SSP1_IRQHandler - .long I2C_IRQHandler - .long CT16B0_IRQHandler - .long CT16B1_IRQHandler - .long CT32B0_IRQHandler - .long CT32B1_IRQHandler - .long SSP0_IRQHandler - .long USART_IRQHandler - .long USB_IRQ_IRQHandler - .long USB_FIQ_IRQHandler - .long ADC_IRQHandler - .long WWDT_IRQHandler - .long BOD_IRQ_IRQHandler - .long FLASH_IRQ_IRQHandler - .long 0 - .long 0 - .long USBWAKEUP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PIN_INT0_IRQHandler - IRQ PIN_INT1_IRQHandler - IRQ PIN_INT2_IRQHandler - IRQ PIN_INT3_IRQHandler - IRQ PIN_INT4_IRQHandler - IRQ PIN_INT5_IRQHandler - IRQ PIN_INT6_IRQHandler - IRQ PIN_INT7_IRQHandler - IRQ GINT0_IRQHandler - IRQ GINT1_IRQHandler - IRQ RIT_IRQ_IRQHandler - IRQ SSP1_IRQHandler - IRQ I2C_IRQHandler - IRQ CT16B0_IRQHandler - IRQ CT16B1_IRQHandler - IRQ CT32B0_IRQHandler - IRQ CT32B1_IRQHandler - IRQ SSP0_IRQHandler - IRQ USART_IRQHandler - IRQ USB_IRQ_IRQHandler - IRQ USB_FIQ_IRQHandler - IRQ ADC_IRQHandler - IRQ WWDT_IRQHandler - IRQ BOD_IRQ_IRQHandler - IRQ FLASH_IRQ_IRQHandler - IRQ USBWAKEUP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc13xx.go b/device/nxp/lpc13xx.go index 159ca69..c4f7cfa 100644 --- a/device/nxp/lpc13xx.go +++ b/device/nxp/lpc13xx.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -193,8 +193,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PIO0_0_IRQHandler func interruptPIO0_0() { diff --git a/device/nxp/lpc13xx.s b/device/nxp/lpc13xx.s deleted file mode 100644 index e433445..0000000 --- a/device/nxp/lpc13xx.s +++ /dev/null @@ -1,182 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC13xx_svd_v1.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC13xx -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PIO0_0_IRQHandler - .long PIO0_1_IRQHandler - .long PIO0_2_IRQHandler - .long PIO0_3_IRQHandler - .long PIO0_4_IRQHandler - .long PIO0_5_IRQHandler - .long PIO0_6_IRQHandler - .long PIO0_7_IRQHandler - .long PIO0_8_IRQHandler - .long PIO0_9_IRQHandler - .long PIO0_10_IRQHandler - .long PIO0_11_IRQHandler - .long PIO1_0_IRQHandler - .long PIO1_1_IRQHandler - .long PIO1_2_IRQHandler - .long PIO1_3_IRQHandler - .long PIO1_4_IRQHandler - .long PIO1_5_IRQHandler - .long PIO1_6_IRQHandler - .long PIO1_7_IRQHandler - .long PIO1_8_IRQHandler - .long PIO1_9_IRQHandler - .long PIO1_10_IRQHandler - .long PIO1_11_IRQHandler - .long PIO2_0_IRQHandler - .long PIO2_1_IRQHandler - .long PIO2_2_IRQHandler - .long PIO2_3_IRQHandler - .long PIO2_4_IRQHandler - .long PIO2_5_IRQHandler - .long PIO2_6_IRQHandler - .long PIO2_7_IRQHandler - .long PIO2_8_IRQHandler - .long PIO2_9_IRQHandler - .long PIO2_10_IRQHandler - .long PIO2_11_IRQHandler - .long PIO3_0_IRQHandler - .long PIO3_1_IRQHandler - .long PIO3_2_IRQHandler - .long PIO3_3_IRQHandler - .long I2C0_IRQHandler - .long CT16B0_IRQHandler - .long CT16B1_IRQHandler - .long CT32B0_IRQHandler - .long CT32B1_IRQHandler - .long SSP0_IRQHandler - .long UART_IRQHandler - .long USBIRQ_IRQHandler - .long USBFIQ_IRQHandler - .long ADC_IRQHandler - .long WDT_IRQHandler - .long BOD_IRQHandler - .long 0 - .long PIO_3_IRQHandler - .long PIO_2_IRQHandler - .long PIO_1_IRQHandler - .long PIO_0_IRQHandler - .long SSP1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PIO0_0_IRQHandler - IRQ PIO0_1_IRQHandler - IRQ PIO0_2_IRQHandler - IRQ PIO0_3_IRQHandler - IRQ PIO0_4_IRQHandler - IRQ PIO0_5_IRQHandler - IRQ PIO0_6_IRQHandler - IRQ PIO0_7_IRQHandler - IRQ PIO0_8_IRQHandler - IRQ PIO0_9_IRQHandler - IRQ PIO0_10_IRQHandler - IRQ PIO0_11_IRQHandler - IRQ PIO1_0_IRQHandler - IRQ PIO1_1_IRQHandler - IRQ PIO1_2_IRQHandler - IRQ PIO1_3_IRQHandler - IRQ PIO1_4_IRQHandler - IRQ PIO1_5_IRQHandler - IRQ PIO1_6_IRQHandler - IRQ PIO1_7_IRQHandler - IRQ PIO1_8_IRQHandler - IRQ PIO1_9_IRQHandler - IRQ PIO1_10_IRQHandler - IRQ PIO1_11_IRQHandler - IRQ PIO2_0_IRQHandler - IRQ PIO2_1_IRQHandler - IRQ PIO2_2_IRQHandler - IRQ PIO2_3_IRQHandler - IRQ PIO2_4_IRQHandler - IRQ PIO2_5_IRQHandler - IRQ PIO2_6_IRQHandler - IRQ PIO2_7_IRQHandler - IRQ PIO2_8_IRQHandler - IRQ PIO2_9_IRQHandler - IRQ PIO2_10_IRQHandler - IRQ PIO2_11_IRQHandler - IRQ PIO3_0_IRQHandler - IRQ PIO3_1_IRQHandler - IRQ PIO3_2_IRQHandler - IRQ PIO3_3_IRQHandler - IRQ I2C0_IRQHandler - IRQ CT16B0_IRQHandler - IRQ CT16B1_IRQHandler - IRQ CT32B0_IRQHandler - IRQ CT32B1_IRQHandler - IRQ SSP0_IRQHandler - IRQ UART_IRQHandler - IRQ USBIRQ_IRQHandler - IRQ USBFIQ_IRQHandler - IRQ ADC_IRQHandler - IRQ WDT_IRQHandler - IRQ BOD_IRQHandler - IRQ PIO_3_IRQHandler - IRQ PIO_2_IRQHandler - IRQ PIO_1_IRQHandler - IRQ PIO_0_IRQHandler - IRQ SSP1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc15xx.go b/device/nxp/lpc15xx.go index 52bb8a7..3ca016a 100644 --- a/device/nxp/lpc15xx.go +++ b/device/nxp/lpc15xx.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -172,8 +172,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WDT_IRQHandler func interruptWDT() { diff --git a/device/nxp/lpc15xx.s b/device/nxp/lpc15xx.s deleted file mode 100644 index 9087d2c..0000000 --- a/device/nxp/lpc15xx.s +++ /dev/null @@ -1,161 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC15xx_v0.7.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC15xx Cortex-M3 MCU; up to 64 kB flash; up to 12 kB SRAM; USB device; USART; EEPROM -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WDT_IRQHandler - .long BOD_IRQ_IRQHandler - .long FLASH_IRQHandler - .long EE_IRQHandler - .long DMA_IRQHandler - .long GINT0_IRQHandler - .long GINT1_IRQHandler - .long PIN_INT0_IRQHandler - .long PIN_INT1_IRQHandler - .long PIN_INT2_IRQHandler - .long PIN_INT3_IRQHandler - .long PIN_INT4_IRQHandler - .long PIN_INT5_IRQHandler - .long PIN_INT6_IRQHandler - .long PIN_INT7_IRQHandler - .long RIT_IRQHandler - .long SCT0_IRQHandler - .long SCT1_IRQHandler - .long SCT2_IRQHandler - .long SCT3_IRQHandler - .long MRT_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long UART2_IRQHandler - .long I2C0_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long C_CAN0_IRQHandler - .long USB_IRQ_IRQHandler - .long USB_FIQ_IRQHandler - .long USBWAKEUP_IRQHandler - .long ADC0_SEQA_IRQHandler - .long ADC0_SEQB_IRQHandler - .long ADC0_THCMP_IRQHandler - .long ADC0_OVR_IRQHandler - .long ADC1_SEQA_IRQHandler - .long ADC1_SEQB_IRQHandler - .long ADC1_THCMP_IRQHandler - .long ADC1_OVR_IRQHandler - .long DAC_IRQHandler - .long CMP0_IRQHandler - .long CMP1_IRQHandler - .long CMP2_IRQHandler - .long CMP3_IRQHandler - .long QEI_IRQHandler - .long RTC_ALARM_IRQHandler - .long RTC_WAKE_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WDT_IRQHandler - IRQ BOD_IRQ_IRQHandler - IRQ FLASH_IRQHandler - IRQ EE_IRQHandler - IRQ DMA_IRQHandler - IRQ GINT0_IRQHandler - IRQ GINT1_IRQHandler - IRQ PIN_INT0_IRQHandler - IRQ PIN_INT1_IRQHandler - IRQ PIN_INT2_IRQHandler - IRQ PIN_INT3_IRQHandler - IRQ PIN_INT4_IRQHandler - IRQ PIN_INT5_IRQHandler - IRQ PIN_INT6_IRQHandler - IRQ PIN_INT7_IRQHandler - IRQ RIT_IRQHandler - IRQ SCT0_IRQHandler - IRQ SCT1_IRQHandler - IRQ SCT2_IRQHandler - IRQ SCT3_IRQHandler - IRQ MRT_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ UART2_IRQHandler - IRQ I2C0_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ C_CAN0_IRQHandler - IRQ USB_IRQ_IRQHandler - IRQ USB_FIQ_IRQHandler - IRQ USBWAKEUP_IRQHandler - IRQ ADC0_SEQA_IRQHandler - IRQ ADC0_SEQB_IRQHandler - IRQ ADC0_THCMP_IRQHandler - IRQ ADC0_OVR_IRQHandler - IRQ ADC1_SEQA_IRQHandler - IRQ ADC1_SEQB_IRQHandler - IRQ ADC1_THCMP_IRQHandler - IRQ ADC1_OVR_IRQHandler - IRQ DAC_IRQHandler - IRQ CMP0_IRQHandler - IRQ CMP1_IRQHandler - IRQ CMP2_IRQHandler - IRQ CMP3_IRQHandler - IRQ QEI_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ RTC_WAKE_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc176x5x.go b/device/nxp/lpc176x5x.go index bfe5f83..be1ab9b 100644 --- a/device/nxp/lpc176x5x.go +++ b/device/nxp/lpc176x5x.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -129,8 +129,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WDT_IRQHandler func interruptWDT() { diff --git a/device/nxp/lpc176x5x.s b/device/nxp/lpc176x5x.s deleted file mode 100644 index bda6564..0000000 --- a/device/nxp/lpc176x5x.s +++ /dev/null @@ -1,137 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC176x5x_v0.2.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC176x/LPC175x M3 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WDT_IRQHandler - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long TIMER3_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long PWM1_IRQHandler - .long I2C0_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI_IRQHandler - .long SSP0_IRQHandler - .long SSP1_IRQHandler - .long PLL0_IRQHandler - .long RTC_IRQHandler - .long EINT0_IRQHandler - .long EINT1_IRQHandler - .long EINT2_IRQHandler - .long EINT3_IRQHandler - .long ADC_IRQHandler - .long BOD_IRQHandler - .long USB_IRQHandler - .long CAN_IRQHandler - .long DMA_IRQHandler - .long I2S_IRQHandler - .long ENET_IRQHandler - .long RIT_IRQHandler - .long MCPWM_IRQHandler - .long QEI_IRQHandler - .long PLL1_IRQHandler - .long USBActivity_IRQHandler - .long CANActivity_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WDT_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER2_IRQHandler - IRQ TIMER3_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ PWM1_IRQHandler - IRQ I2C0_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI_IRQHandler - IRQ SSP0_IRQHandler - IRQ SSP1_IRQHandler - IRQ PLL0_IRQHandler - IRQ RTC_IRQHandler - IRQ EINT0_IRQHandler - IRQ EINT1_IRQHandler - IRQ EINT2_IRQHandler - IRQ EINT3_IRQHandler - IRQ ADC_IRQHandler - IRQ BOD_IRQHandler - IRQ USB_IRQHandler - IRQ CAN_IRQHandler - IRQ DMA_IRQHandler - IRQ I2S_IRQHandler - IRQ ENET_IRQHandler - IRQ RIT_IRQHandler - IRQ MCPWM_IRQHandler - IRQ QEI_IRQHandler - IRQ PLL1_IRQHandler - IRQ USBActivity_IRQHandler - IRQ CANActivity_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc18xx.go b/device/nxp/lpc18xx.go index 5131ad3..902385c 100644 --- a/device/nxp/lpc18xx.go +++ b/device/nxp/lpc18xx.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -155,8 +155,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export DAC_IRQHandler func interruptDAC() { diff --git a/device/nxp/lpc18xx.s b/device/nxp/lpc18xx.s deleted file mode 100644 index 34da638..0000000 --- a/device/nxp/lpc18xx.s +++ /dev/null @@ -1,165 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC18xx.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// Register cmsis file for LPC18xx parts -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long DAC_IRQHandler - .long 0 - .long DMA_IRQHandler - .long 0 - .long FLASH_IRQHandler - .long ETHERNET_IRQHandler - .long SDIO_IRQHandler - .long LCD_IRQHandler - .long USB0_IRQHandler - .long USB1_IRQHandler - .long SCT_IRQHandler - .long RITIMER_IRQHandler - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long TIMER3_IRQHandler - .long MCPWM_IRQHandler - .long ADC0_IRQHandler - .long I2C0_IRQHandler - .long I2C1_IRQHandler - .long 0 - .long ADC1_IRQHandler - .long SSP0_IRQHandler - .long SSP1_IRQHandler - .long USART0_IRQHandler - .long UART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long I2S0_IRQHandler - .long I2S1_IRQHandler - .long SPIFI_IRQHandler - .long 0 - .long PIN_INT0_IRQHandler - .long PIN_INT1_IRQHandler - .long PIN_INT2_IRQHandler - .long PIN_INT3_IRQHandler - .long PIN_INT4_IRQHandler - .long PIN_INT5_IRQHandler - .long PIN_INT6_IRQHandler - .long PIN_INT7_IRQHandler - .long GINT0_IRQHandler - .long GINT1_IRQHandler - .long EVENTROUTER_IRQHandler - .long C_CAN1_IRQHandler - .long 0 - .long 0 - .long ATIMER_IRQHandler - .long RTC_IRQHandler - .long 0 - .long WWDT_IRQHandler - .long 0 - .long C_CAN0_IRQHandler - .long QEI_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ DAC_IRQHandler - IRQ DMA_IRQHandler - IRQ FLASH_IRQHandler - IRQ ETHERNET_IRQHandler - IRQ SDIO_IRQHandler - IRQ LCD_IRQHandler - IRQ USB0_IRQHandler - IRQ USB1_IRQHandler - IRQ SCT_IRQHandler - IRQ RITIMER_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER2_IRQHandler - IRQ TIMER3_IRQHandler - IRQ MCPWM_IRQHandler - IRQ ADC0_IRQHandler - IRQ I2C0_IRQHandler - IRQ I2C1_IRQHandler - IRQ ADC1_IRQHandler - IRQ SSP0_IRQHandler - IRQ SSP1_IRQHandler - IRQ USART0_IRQHandler - IRQ UART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ I2S0_IRQHandler - IRQ I2S1_IRQHandler - IRQ SPIFI_IRQHandler - IRQ PIN_INT0_IRQHandler - IRQ PIN_INT1_IRQHandler - IRQ PIN_INT2_IRQHandler - IRQ PIN_INT3_IRQHandler - IRQ PIN_INT4_IRQHandler - IRQ PIN_INT5_IRQHandler - IRQ PIN_INT6_IRQHandler - IRQ PIN_INT7_IRQHandler - IRQ GINT0_IRQHandler - IRQ GINT1_IRQHandler - IRQ EVENTROUTER_IRQHandler - IRQ C_CAN1_IRQHandler - IRQ ATIMER_IRQHandler - IRQ RTC_IRQHandler - IRQ WWDT_IRQHandler - IRQ C_CAN0_IRQHandler - IRQ QEI_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc408x_7x.go b/device/nxp/lpc408x_7x.go index 47d117b..8b26406 100644 --- a/device/nxp/lpc408x_7x.go +++ b/device/nxp/lpc408x_7x.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -139,8 +139,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDT_IRQHandler func interruptWWDT() { diff --git a/device/nxp/lpc408x_7x.s b/device/nxp/lpc408x_7x.s deleted file mode 100644 index bc7f82a..0000000 --- a/device/nxp/lpc408x_7x.s +++ /dev/null @@ -1,149 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC408x_7x_v0.7.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC408x/7x M4 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDT_IRQHandler - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long TIMER3_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long PWM1_IRQHandler - .long I2C0_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long 0 - .long SSP0_IRQHandler - .long SSP1_IRQHandler - .long 0 - .long RTC_IRQHandler - .long EINT0_IRQHandler - .long EINT1_IRQHandler - .long EINT2_IRQHandler - .long EINT3_IRQHandler - .long ADC_IRQHandler - .long BOD_IRQHandler - .long USB_IRQHandler - .long CAN_IRQHandler - .long GPDMA_IRQHandler - .long I2S_IRQHandler - .long ETHERNET_IRQHandler - .long SDMMC_IRQHandler - .long MCPWM_IRQHandler - .long QEI_IRQHandler - .long 0 - .long USB_NEED_CLK_IRQHandler - .long 0 - .long UART4_IRQHandler - .long SSP2_IRQHandler - .long LCD_IRQHandler - .long GPIOINT_IRQHandler - .long PWM0_IRQHandler - .long EEPROM_IRQHandler - .long CMP0_IRQHandler - .long CMP1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDT_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER2_IRQHandler - IRQ TIMER3_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ PWM1_IRQHandler - IRQ I2C0_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SSP0_IRQHandler - IRQ SSP1_IRQHandler - IRQ RTC_IRQHandler - IRQ EINT0_IRQHandler - IRQ EINT1_IRQHandler - IRQ EINT2_IRQHandler - IRQ EINT3_IRQHandler - IRQ ADC_IRQHandler - IRQ BOD_IRQHandler - IRQ USB_IRQHandler - IRQ CAN_IRQHandler - IRQ GPDMA_IRQHandler - IRQ I2S_IRQHandler - IRQ ETHERNET_IRQHandler - IRQ SDMMC_IRQHandler - IRQ MCPWM_IRQHandler - IRQ QEI_IRQHandler - IRQ USB_NEED_CLK_IRQHandler - IRQ UART4_IRQHandler - IRQ SSP2_IRQHandler - IRQ LCD_IRQHandler - IRQ GPIOINT_IRQHandler - IRQ PWM0_IRQHandler - IRQ EEPROM_IRQHandler - IRQ CMP0_IRQHandler - IRQ CMP1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc43xx.go b/device/nxp/lpc43xx.go index 3dcda97..d49f371 100644 --- a/device/nxp/lpc43xx.go +++ b/device/nxp/lpc43xx.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -164,8 +164,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export DAC_IRQHandler func interruptDAC() { diff --git a/device/nxp/lpc43xx.s b/device/nxp/lpc43xx.s deleted file mode 100644 index 840620f..0000000 --- a/device/nxp/lpc43xx.s +++ /dev/null @@ -1,168 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC43xx_43Sxx.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// Register cmsis file for LPC43xx parts -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long DAC_IRQHandler - .long 0 - .long DMA_IRQHandler - .long 0 - .long FLASH_IRQHandler - .long ETHERNET_IRQHandler - .long SDIO_IRQHandler - .long LCD_IRQHandler - .long USB0_IRQHandler - .long USB1_IRQHandler - .long SCT_IRQHandler - .long RITIMER_IRQHandler - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long TIMER3_IRQHandler - .long MCPWM_IRQHandler - .long ADC0_IRQHandler - .long I2C0_IRQHandler - .long I2C1_IRQHandler - .long SPI_INT_IRQHandler - .long ADC1_IRQHandler - .long SSP0_IRQHandler - .long SSP1_IRQHandler - .long USART0_IRQHandler - .long UART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long I2S0_IRQHandler - .long I2S1_IRQHandler - .long SPIFI_IRQHandler - .long SGPIO_IINT_IRQHandler - .long PIN_INT0_IRQHandler - .long PIN_INT1_IRQHandler - .long PIN_INT2_IRQHandler - .long PIN_INT3_IRQHandler - .long PIN_INT4_IRQHandler - .long PIN_INT5_IRQHandler - .long PIN_INT6_IRQHandler - .long PIN_INT7_IRQHandler - .long GINT0_IRQHandler - .long GINT1_IRQHandler - .long EVENTROUTER_IRQHandler - .long C_CAN1_IRQHandler - .long 0 - .long ADCHS_IRQHandler - .long ATIMER_IRQHandler - .long RTC_IRQHandler - .long 0 - .long WWDT_IRQHandler - .long 0 - .long C_CAN0_IRQHandler - .long QEI_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ DAC_IRQHandler - IRQ DMA_IRQHandler - IRQ FLASH_IRQHandler - IRQ ETHERNET_IRQHandler - IRQ SDIO_IRQHandler - IRQ LCD_IRQHandler - IRQ USB0_IRQHandler - IRQ USB1_IRQHandler - IRQ SCT_IRQHandler - IRQ RITIMER_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER2_IRQHandler - IRQ TIMER3_IRQHandler - IRQ MCPWM_IRQHandler - IRQ ADC0_IRQHandler - IRQ I2C0_IRQHandler - IRQ I2C1_IRQHandler - IRQ SPI_INT_IRQHandler - IRQ ADC1_IRQHandler - IRQ SSP0_IRQHandler - IRQ SSP1_IRQHandler - IRQ USART0_IRQHandler - IRQ UART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ I2S0_IRQHandler - IRQ I2S1_IRQHandler - IRQ SPIFI_IRQHandler - IRQ SGPIO_IINT_IRQHandler - IRQ PIN_INT0_IRQHandler - IRQ PIN_INT1_IRQHandler - IRQ PIN_INT2_IRQHandler - IRQ PIN_INT3_IRQHandler - IRQ PIN_INT4_IRQHandler - IRQ PIN_INT5_IRQHandler - IRQ PIN_INT6_IRQHandler - IRQ PIN_INT7_IRQHandler - IRQ GINT0_IRQHandler - IRQ GINT1_IRQHandler - IRQ EVENTROUTER_IRQHandler - IRQ C_CAN1_IRQHandler - IRQ ADCHS_IRQHandler - IRQ ATIMER_IRQHandler - IRQ RTC_IRQHandler - IRQ WWDT_IRQHandler - IRQ C_CAN0_IRQHandler - IRQ QEI_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc5410x.go b/device/nxp/lpc5410x.go index 252ec81..ff1fb07 100644 --- a/device/nxp/lpc5410x.go +++ b/device/nxp/lpc5410x.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -139,8 +139,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WDT_IRQHandler func interruptWDT() { diff --git a/device/nxp/lpc5410x.s b/device/nxp/lpc5410x.s deleted file mode 100644 index 5262e98..0000000 --- a/device/nxp/lpc5410x.s +++ /dev/null @@ -1,144 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC5410x_v0.4.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC5410x Cortex-M4 MCU; Cortex-M0+ coprocessor -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WDT_IRQHandler - .long BOD_IRQHandler - .long 0 - .long DMA_IRQHandler - .long GINT0_IRQHandler - .long PIN_INT0_IRQHandler - .long PIN_INT1_IRQHandler - .long PIN_INT2_IRQHandler - .long PIN_INT3_IRQHandler - .long UTICK_IRQHandler - .long MRT_IRQHandler - .long CT32B0_IRQHandler - .long CT32B1_IRQHandler - .long CT32B2_IRQHandler - .long CT32B3_IRQHandler - .long CT32B4_IRQHandler - .long SCT0_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long I2C0_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long ADC_SEQA_IRQHandler - .long ADC_SEQB_IRQHandler - .long ADC_THCMP_IRQHandler - .long RTC_IRQHandler - .long 0 - .long MAILBOX_IRQHandler - .long GINT1_IRQHandler - .long PIN_INT4_IRQHandler - .long PIN_INT5_IRQHandler - .long PIN_INT6_IRQHandler - .long PIN_INT7_IRQHandler - .long 0 - .long 0 - .long 0 - .long RIT_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WDT_IRQHandler - IRQ BOD_IRQHandler - IRQ DMA_IRQHandler - IRQ GINT0_IRQHandler - IRQ PIN_INT0_IRQHandler - IRQ PIN_INT1_IRQHandler - IRQ PIN_INT2_IRQHandler - IRQ PIN_INT3_IRQHandler - IRQ UTICK_IRQHandler - IRQ MRT_IRQHandler - IRQ CT32B0_IRQHandler - IRQ CT32B1_IRQHandler - IRQ CT32B2_IRQHandler - IRQ CT32B3_IRQHandler - IRQ CT32B4_IRQHandler - IRQ SCT0_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ I2C0_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ ADC_SEQA_IRQHandler - IRQ ADC_SEQB_IRQHandler - IRQ ADC_THCMP_IRQHandler - IRQ RTC_IRQHandler - IRQ MAILBOX_IRQHandler - IRQ GINT1_IRQHandler - IRQ PIN_INT4_IRQHandler - IRQ PIN_INT5_IRQHandler - IRQ PIN_INT6_IRQHandler - IRQ PIN_INT7_IRQHandler - IRQ RIT_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/lpc800.go b/device/nxp/lpc800.go index 70f1e22..eebd53a 100644 --- a/device/nxp/lpc800.go +++ b/device/nxp/lpc800.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -91,8 +91,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SPI0_IRQHandler func interruptSPI0() { diff --git a/device/nxp/lpc800.s b/device/nxp/lpc800.s deleted file mode 100644 index f6b88f4..0000000 --- a/device/nxp/lpc800.s +++ /dev/null @@ -1,120 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC800_v0.3.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// LPC800 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long I2C_IRQHandler - .long SCT_IRQHandler - .long MRT_IRQHandler - .long CMP_IRQHandler - .long WDT_IRQHandler - .long BOD_IRQHandler - .long FLASH_IRQ_IRQHandler - .long WKT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PININT0_IRQHandler - .long PININT1_IRQHandler - .long PININT2_IRQHandler - .long PININT3_IRQHandler - .long PININT4_IRQHandler - .long PININT5_IRQHandler - .long PININT6_IRQHandler - .long PININT7_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ UART2_IRQHandler - IRQ I2C_IRQHandler - IRQ SCT_IRQHandler - IRQ MRT_IRQHandler - IRQ CMP_IRQHandler - IRQ WDT_IRQHandler - IRQ BOD_IRQHandler - IRQ FLASH_IRQ_IRQHandler - IRQ WKT_IRQHandler - IRQ PININT0_IRQHandler - IRQ PININT1_IRQHandler - IRQ PININT2_IRQHandler - IRQ PININT3_IRQHandler - IRQ PININT4_IRQHandler - IRQ PININT5_IRQHandler - IRQ PININT6_IRQHandler - IRQ PININT7_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/mimxrt1011.go b/device/nxp/mimxrt1011.go index dbd0f1b..e15b636 100644 --- a/device/nxp/mimxrt1011.go +++ b/device/nxp/mimxrt1011.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -271,8 +271,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export DMA0_IRQHandler func interruptDMA0() { diff --git a/device/nxp/mimxrt1011.s b/device/nxp/mimxrt1011.s deleted file mode 100644 index 91ae956..0000000 --- a/device/nxp/mimxrt1011.s +++ /dev/null @@ -1,227 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from MIMXRT1011.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// MIMXRT1011DAE5A -*/ - -// Copyright 2016-2019 NXP All rights reserved. SPDX-License-Identifier: BSD-3-Clause - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long DMA0_IRQHandler - .long DMA1_IRQHandler - .long DMA2_IRQHandler - .long DMA3_IRQHandler - .long DMA4_IRQHandler - .long DMA5_IRQHandler - .long DMA6_IRQHandler - .long DMA7_IRQHandler - .long DMA8_IRQHandler - .long DMA9_IRQHandler - .long DMA10_IRQHandler - .long DMA11_IRQHandler - .long DMA12_IRQHandler - .long DMA13_IRQHandler - .long DMA14_IRQHandler - .long DMA15_IRQHandler - .long DMA_ERROR_IRQHandler - .long CTI0_ERROR_IRQHandler - .long CTI1_ERROR_IRQHandler - .long CORE_IRQHandler - .long LPUART1_IRQHandler - .long LPUART2_IRQHandler - .long LPUART3_IRQHandler - .long LPUART4_IRQHandler - .long PIT_IRQHandler - .long USB_OTG1_IRQHandler - .long FLEXSPI_IRQHandler - .long FLEXRAM_IRQHandler - .long LPI2C1_IRQHandler - .long LPI2C2_IRQHandler - .long GPT1_IRQHandler - .long GPT2_IRQHandler - .long LPSPI1_IRQHandler - .long LPSPI2_IRQHandler - .long PWM1_0_IRQHandler - .long PWM1_1_IRQHandler - .long PWM1_2_IRQHandler - .long PWM1_3_IRQHandler - .long PWM1_FAULT_IRQHandler - .long KPP_IRQHandler - .long SRC_IRQHandler - .long GPR_IRQ_IRQHandler - .long CCM_1_IRQHandler - .long CCM_2_IRQHandler - .long EWM_IRQHandler - .long WDOG2_IRQHandler - .long SNVS_HP_WRAPPER_IRQHandler - .long SNVS_HP_WRAPPER_TZ_IRQHandler - .long SNVS_LP_WRAPPER_IRQHandler - .long CSU_IRQHandler - .long DCP_IRQHandler - .long DCP_VMI_IRQHandler - .long Reserved68_IRQHandler - .long TRNG_IRQHandler - .long Reserved70_IRQHandler - .long Reserved71_IRQHandler - .long SAI1_IRQHandler - .long RTWDOG_IRQHandler - .long SAI3_RX_IRQHandler - .long SAI3_TX_IRQHandler - .long SPDIF_IRQHandler - .long PMU_IRQHandler - .long XBAR1_IRQ_0_1_2_3_IRQHandler - .long TEMP_LOW_HIGH_IRQHandler - .long TEMP_PANIC_IRQHandler - .long USB_PHY_IRQHandler - .long GPC_IRQHandler - .long ADC1_IRQHandler - .long FLEXIO1_IRQHandler - .long DCDC_IRQHandler - .long GPIO1_Combined_0_15_IRQHandler - .long GPIO1_Combined_16_31_IRQHandler - .long GPIO2_Combined_0_15_IRQHandler - .long GPIO5_Combined_0_15_IRQHandler - .long WDOG1_IRQHandler - .long ADC_ETC_IRQ0_IRQHandler - .long ADC_ETC_IRQ1_IRQHandler - .long ADC_ETC_IRQ2_IRQHandler - .long ADC_ETC_IRQ3_IRQHandler - .long ADC_ETC_ERROR_IRQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ DMA0_IRQHandler - IRQ DMA1_IRQHandler - IRQ DMA2_IRQHandler - IRQ DMA3_IRQHandler - IRQ DMA4_IRQHandler - IRQ DMA5_IRQHandler - IRQ DMA6_IRQHandler - IRQ DMA7_IRQHandler - IRQ DMA8_IRQHandler - IRQ DMA9_IRQHandler - IRQ DMA10_IRQHandler - IRQ DMA11_IRQHandler - IRQ DMA12_IRQHandler - IRQ DMA13_IRQHandler - IRQ DMA14_IRQHandler - IRQ DMA15_IRQHandler - IRQ DMA_ERROR_IRQHandler - IRQ CTI0_ERROR_IRQHandler - IRQ CTI1_ERROR_IRQHandler - IRQ CORE_IRQHandler - IRQ LPUART1_IRQHandler - IRQ LPUART2_IRQHandler - IRQ LPUART3_IRQHandler - IRQ LPUART4_IRQHandler - IRQ PIT_IRQHandler - IRQ USB_OTG1_IRQHandler - IRQ FLEXSPI_IRQHandler - IRQ FLEXRAM_IRQHandler - IRQ LPI2C1_IRQHandler - IRQ LPI2C2_IRQHandler - IRQ GPT1_IRQHandler - IRQ GPT2_IRQHandler - IRQ LPSPI1_IRQHandler - IRQ LPSPI2_IRQHandler - IRQ PWM1_0_IRQHandler - IRQ PWM1_1_IRQHandler - IRQ PWM1_2_IRQHandler - IRQ PWM1_3_IRQHandler - IRQ PWM1_FAULT_IRQHandler - IRQ KPP_IRQHandler - IRQ SRC_IRQHandler - IRQ GPR_IRQ_IRQHandler - IRQ CCM_1_IRQHandler - IRQ CCM_2_IRQHandler - IRQ EWM_IRQHandler - IRQ WDOG2_IRQHandler - IRQ SNVS_HP_WRAPPER_IRQHandler - IRQ SNVS_HP_WRAPPER_TZ_IRQHandler - IRQ SNVS_LP_WRAPPER_IRQHandler - IRQ CSU_IRQHandler - IRQ DCP_IRQHandler - IRQ DCP_VMI_IRQHandler - IRQ Reserved68_IRQHandler - IRQ TRNG_IRQHandler - IRQ Reserved70_IRQHandler - IRQ Reserved71_IRQHandler - IRQ SAI1_IRQHandler - IRQ RTWDOG_IRQHandler - IRQ SAI3_RX_IRQHandler - IRQ SAI3_TX_IRQHandler - IRQ SPDIF_IRQHandler - IRQ PMU_IRQHandler - IRQ XBAR1_IRQ_0_1_2_3_IRQHandler - IRQ TEMP_LOW_HIGH_IRQHandler - IRQ TEMP_PANIC_IRQHandler - IRQ USB_PHY_IRQHandler - IRQ GPC_IRQHandler - IRQ ADC1_IRQHandler - IRQ FLEXIO1_IRQHandler - IRQ DCDC_IRQHandler - IRQ GPIO1_Combined_0_15_IRQHandler - IRQ GPIO1_Combined_16_31_IRQHandler - IRQ GPIO2_Combined_0_15_IRQHandler - IRQ GPIO5_Combined_0_15_IRQHandler - IRQ WDOG1_IRQHandler - IRQ ADC_ETC_IRQ0_IRQHandler - IRQ ADC_ETC_IRQ1_IRQHandler - IRQ ADC_ETC_IRQ2_IRQHandler - IRQ ADC_ETC_IRQ3_IRQHandler - IRQ ADC_ETC_ERROR_IRQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/mimxrt1021.go b/device/nxp/mimxrt1021.go index b62fe44..410eaf0 100644 --- a/device/nxp/mimxrt1021.go +++ b/device/nxp/mimxrt1021.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -454,8 +454,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export DMA0_DMA16_IRQHandler func interruptDMA0_DMA16() { diff --git a/device/nxp/mimxrt1021.s b/device/nxp/mimxrt1021.s deleted file mode 100644 index 9d6009d..0000000 --- a/device/nxp/mimxrt1021.s +++ /dev/null @@ -1,350 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from MIMXRT1021.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// MIMXRT1021DAG5A -*/ - -// Copyright 2016-2020 NXP All rights reserved. SPDX-License-Identifier: BSD-3-Clause - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long DMA0_DMA16_IRQHandler - .long DMA1_DMA17_IRQHandler - .long DMA2_DMA18_IRQHandler - .long DMA3_DMA19_IRQHandler - .long DMA4_DMA20_IRQHandler - .long DMA5_DMA21_IRQHandler - .long DMA6_DMA22_IRQHandler - .long DMA7_DMA23_IRQHandler - .long DMA8_DMA24_IRQHandler - .long DMA9_DMA25_IRQHandler - .long DMA10_DMA26_IRQHandler - .long DMA11_DMA27_IRQHandler - .long DMA12_DMA28_IRQHandler - .long DMA13_DMA29_IRQHandler - .long DMA14_DMA30_IRQHandler - .long DMA15_DMA31_IRQHandler - .long DMA_ERROR_IRQHandler - .long CTI0_ERROR_IRQHandler - .long CTI1_ERROR_IRQHandler - .long CORE_IRQHandler - .long LPUART1_IRQHandler - .long LPUART2_IRQHandler - .long LPUART3_IRQHandler - .long LPUART4_IRQHandler - .long LPUART5_IRQHandler - .long LPUART6_IRQHandler - .long LPUART7_IRQHandler - .long LPUART8_IRQHandler - .long LPI2C1_IRQHandler - .long LPI2C2_IRQHandler - .long LPI2C3_IRQHandler - .long LPI2C4_IRQHandler - .long LPSPI1_IRQHandler - .long LPSPI2_IRQHandler - .long LPSPI3_IRQHandler - .long LPSPI4_IRQHandler - .long CAN1_IRQHandler - .long CAN2_IRQHandler - .long FLEXRAM_IRQHandler - .long KPP_IRQHandler - .long Reserved56_IRQHandler - .long GPR_IRQ_IRQHandler - .long Reserved58_IRQHandler - .long Reserved59_IRQHandler - .long Reserved60_IRQHandler - .long WDOG2_IRQHandler - .long SNVS_HP_WRAPPER_IRQHandler - .long SNVS_HP_WRAPPER_TZ_IRQHandler - .long SNVS_LP_HP_WRAPPER_IRQHandler - .long CSU_IRQHandler - .long DCP_IRQHandler - .long DCP_VMI_IRQHandler - .long Reserved68_IRQHandler - .long TRNG_IRQHandler - .long 0 - .long BEE_IRQHandler - .long SAI1_IRQHandler - .long SAI2_IRQHandler - .long SAI3_RX_IRQHandler - .long SAI3_TX_IRQHandler - .long SPDIF_IRQHandler - .long PMU_IRQHandler - .long Reserved78_IRQHandler - .long TEMP_LOW_HIGH_IRQHandler - .long TEMP_PANIC_IRQHandler - .long USB_PHY_IRQHandler - .long Reserved82_IRQHandler - .long ADC1_IRQHandler - .long ADC2_IRQHandler - .long DCDC_IRQHandler - .long Reserved86_IRQHandler - .long Reserved87_IRQHandler - .long GPIO1_INT0_IRQHandler - .long GPIO1_INT1_IRQHandler - .long GPIO1_INT2_IRQHandler - .long GPIO1_INT3_IRQHandler - .long GPIO1_INT4_IRQHandler - .long GPIO1_INT5_IRQHandler - .long GPIO1_INT6_IRQHandler - .long GPIO1_INT7_IRQHandler - .long GPIO1_Combined_0_15_IRQHandler - .long GPIO1_Combined_16_31_IRQHandler - .long GPIO2_Combined_0_15_IRQHandler - .long GPIO2_Combined_16_31_IRQHandler - .long GPIO3_Combined_0_15_IRQHandler - .long GPIO3_Combined_16_31_IRQHandler - .long Reserved102_IRQHandler - .long Reserved103_IRQHandler - .long GPIO5_Combined_0_15_IRQHandler - .long GPIO5_Combined_16_31_IRQHandler - .long FLEXIO1_IRQHandler - .long Reserved107_IRQHandler - .long WDOG1_IRQHandler - .long RTWDOG_IRQHandler - .long EWM_IRQHandler - .long CCM_1_IRQHandler - .long CCM_2_IRQHandler - .long GPC_IRQHandler - .long SRC_IRQHandler - .long Reserved115_IRQHandler - .long GPT1_IRQHandler - .long GPT2_IRQHandler - .long PWM1_0_IRQHandler - .long PWM1_1_IRQHandler - .long PWM1_2_IRQHandler - .long PWM1_3_IRQHandler - .long PWM1_FAULT_IRQHandler - .long Reserved123_IRQHandler - .long FLEXSPI_IRQHandler - .long SEMC_IRQHandler - .long USDHC1_IRQHandler - .long USDHC2_IRQHandler - .long Reserved128_IRQHandler - .long USB_OTG1_IRQHandler - .long ENET_IRQHandler - .long ENET_1588_Timer_IRQHandler - .long XBAR1_IRQ_0_1_IRQHandler - .long XBAR1_IRQ_2_3_IRQHandler - .long ADC_ETC_IRQ0_IRQHandler - .long ADC_ETC_IRQ1_IRQHandler - .long ADC_ETC_IRQ2_IRQHandler - .long ADC_ETC_ERROR_IRQ_IRQHandler - .long PIT_IRQHandler - .long ACMP1_IRQHandler - .long ACMP2_IRQHandler - .long ACMP3_IRQHandler - .long ACMP4_IRQHandler - .long Reserved143_IRQHandler - .long Reserved144_IRQHandler - .long ENC1_IRQHandler - .long ENC2_IRQHandler - .long Reserved147_IRQHandler - .long Reserved148_IRQHandler - .long TMR1_IRQHandler - .long TMR2_IRQHandler - .long Reserved151_IRQHandler - .long Reserved152_IRQHandler - .long PWM2_0_IRQHandler - .long PWM2_1_IRQHandler - .long PWM2_2_IRQHandler - .long PWM2_3_IRQHandler - .long PWM2_FAULT_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ DMA0_DMA16_IRQHandler - IRQ DMA1_DMA17_IRQHandler - IRQ DMA2_DMA18_IRQHandler - IRQ DMA3_DMA19_IRQHandler - IRQ DMA4_DMA20_IRQHandler - IRQ DMA5_DMA21_IRQHandler - IRQ DMA6_DMA22_IRQHandler - IRQ DMA7_DMA23_IRQHandler - IRQ DMA8_DMA24_IRQHandler - IRQ DMA9_DMA25_IRQHandler - IRQ DMA10_DMA26_IRQHandler - IRQ DMA11_DMA27_IRQHandler - IRQ DMA12_DMA28_IRQHandler - IRQ DMA13_DMA29_IRQHandler - IRQ DMA14_DMA30_IRQHandler - IRQ DMA15_DMA31_IRQHandler - IRQ DMA_ERROR_IRQHandler - IRQ CTI0_ERROR_IRQHandler - IRQ CTI1_ERROR_IRQHandler - IRQ CORE_IRQHandler - IRQ LPUART1_IRQHandler - IRQ LPUART2_IRQHandler - IRQ LPUART3_IRQHandler - IRQ LPUART4_IRQHandler - IRQ LPUART5_IRQHandler - IRQ LPUART6_IRQHandler - IRQ LPUART7_IRQHandler - IRQ LPUART8_IRQHandler - IRQ LPI2C1_IRQHandler - IRQ LPI2C2_IRQHandler - IRQ LPI2C3_IRQHandler - IRQ LPI2C4_IRQHandler - IRQ LPSPI1_IRQHandler - IRQ LPSPI2_IRQHandler - IRQ LPSPI3_IRQHandler - IRQ LPSPI4_IRQHandler - IRQ CAN1_IRQHandler - IRQ CAN2_IRQHandler - IRQ FLEXRAM_IRQHandler - IRQ KPP_IRQHandler - IRQ Reserved56_IRQHandler - IRQ GPR_IRQ_IRQHandler - IRQ Reserved58_IRQHandler - IRQ Reserved59_IRQHandler - IRQ Reserved60_IRQHandler - IRQ WDOG2_IRQHandler - IRQ SNVS_HP_WRAPPER_IRQHandler - IRQ SNVS_HP_WRAPPER_TZ_IRQHandler - IRQ SNVS_LP_HP_WRAPPER_IRQHandler - IRQ CSU_IRQHandler - IRQ DCP_IRQHandler - IRQ DCP_VMI_IRQHandler - IRQ Reserved68_IRQHandler - IRQ TRNG_IRQHandler - IRQ BEE_IRQHandler - IRQ SAI1_IRQHandler - IRQ SAI2_IRQHandler - IRQ SAI3_RX_IRQHandler - IRQ SAI3_TX_IRQHandler - IRQ SPDIF_IRQHandler - IRQ PMU_IRQHandler - IRQ Reserved78_IRQHandler - IRQ TEMP_LOW_HIGH_IRQHandler - IRQ TEMP_PANIC_IRQHandler - IRQ USB_PHY_IRQHandler - IRQ Reserved82_IRQHandler - IRQ ADC1_IRQHandler - IRQ ADC2_IRQHandler - IRQ DCDC_IRQHandler - IRQ Reserved86_IRQHandler - IRQ Reserved87_IRQHandler - IRQ GPIO1_INT0_IRQHandler - IRQ GPIO1_INT1_IRQHandler - IRQ GPIO1_INT2_IRQHandler - IRQ GPIO1_INT3_IRQHandler - IRQ GPIO1_INT4_IRQHandler - IRQ GPIO1_INT5_IRQHandler - IRQ GPIO1_INT6_IRQHandler - IRQ GPIO1_INT7_IRQHandler - IRQ GPIO1_Combined_0_15_IRQHandler - IRQ GPIO1_Combined_16_31_IRQHandler - IRQ GPIO2_Combined_0_15_IRQHandler - IRQ GPIO2_Combined_16_31_IRQHandler - IRQ GPIO3_Combined_0_15_IRQHandler - IRQ GPIO3_Combined_16_31_IRQHandler - IRQ Reserved102_IRQHandler - IRQ Reserved103_IRQHandler - IRQ GPIO5_Combined_0_15_IRQHandler - IRQ GPIO5_Combined_16_31_IRQHandler - IRQ FLEXIO1_IRQHandler - IRQ Reserved107_IRQHandler - IRQ WDOG1_IRQHandler - IRQ RTWDOG_IRQHandler - IRQ EWM_IRQHandler - IRQ CCM_1_IRQHandler - IRQ CCM_2_IRQHandler - IRQ GPC_IRQHandler - IRQ SRC_IRQHandler - IRQ Reserved115_IRQHandler - IRQ GPT1_IRQHandler - IRQ GPT2_IRQHandler - IRQ PWM1_0_IRQHandler - IRQ PWM1_1_IRQHandler - IRQ PWM1_2_IRQHandler - IRQ PWM1_3_IRQHandler - IRQ PWM1_FAULT_IRQHandler - IRQ Reserved123_IRQHandler - IRQ FLEXSPI_IRQHandler - IRQ SEMC_IRQHandler - IRQ USDHC1_IRQHandler - IRQ USDHC2_IRQHandler - IRQ Reserved128_IRQHandler - IRQ USB_OTG1_IRQHandler - IRQ ENET_IRQHandler - IRQ ENET_1588_Timer_IRQHandler - IRQ XBAR1_IRQ_0_1_IRQHandler - IRQ XBAR1_IRQ_2_3_IRQHandler - IRQ ADC_ETC_IRQ0_IRQHandler - IRQ ADC_ETC_IRQ1_IRQHandler - IRQ ADC_ETC_IRQ2_IRQHandler - IRQ ADC_ETC_ERROR_IRQ_IRQHandler - IRQ PIT_IRQHandler - IRQ ACMP1_IRQHandler - IRQ ACMP2_IRQHandler - IRQ ACMP3_IRQHandler - IRQ ACMP4_IRQHandler - IRQ Reserved143_IRQHandler - IRQ Reserved144_IRQHandler - IRQ ENC1_IRQHandler - IRQ ENC2_IRQHandler - IRQ Reserved147_IRQHandler - IRQ Reserved148_IRQHandler - IRQ TMR1_IRQHandler - IRQ TMR2_IRQHandler - IRQ Reserved151_IRQHandler - IRQ Reserved152_IRQHandler - IRQ PWM2_0_IRQHandler - IRQ PWM2_1_IRQHandler - IRQ PWM2_2_IRQHandler - IRQ PWM2_3_IRQHandler - IRQ PWM2_FAULT_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/mimxrt1052.go b/device/nxp/mimxrt1052.go index 5e9e0ac..112d71b 100644 --- a/device/nxp/mimxrt1052.go +++ b/device/nxp/mimxrt1052.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -487,8 +487,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export DMA0_DMA16_IRQHandler func interruptDMA0_DMA16() { diff --git a/device/nxp/mimxrt1052.s b/device/nxp/mimxrt1052.s deleted file mode 100644 index 0f4c641..0000000 --- a/device/nxp/mimxrt1052.s +++ /dev/null @@ -1,371 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from MIMXRT1052.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// MIMXRT1052DVL6B -*/ - -// Copyright 2016-2019 NXP All rights reserved. SPDX-License-Identifier: BSD-3-Clause - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long DMA0_DMA16_IRQHandler - .long DMA1_DMA17_IRQHandler - .long DMA2_DMA18_IRQHandler - .long DMA3_DMA19_IRQHandler - .long DMA4_DMA20_IRQHandler - .long DMA5_DMA21_IRQHandler - .long DMA6_DMA22_IRQHandler - .long DMA7_DMA23_IRQHandler - .long DMA8_DMA24_IRQHandler - .long DMA9_DMA25_IRQHandler - .long DMA10_DMA26_IRQHandler - .long DMA11_DMA27_IRQHandler - .long DMA12_DMA28_IRQHandler - .long DMA13_DMA29_IRQHandler - .long DMA14_DMA30_IRQHandler - .long DMA15_DMA31_IRQHandler - .long DMA_ERROR_IRQHandler - .long CTI0_ERROR_IRQHandler - .long CTI1_ERROR_IRQHandler - .long CORE_IRQHandler - .long LPUART1_IRQHandler - .long LPUART2_IRQHandler - .long LPUART3_IRQHandler - .long LPUART4_IRQHandler - .long LPUART5_IRQHandler - .long LPUART6_IRQHandler - .long LPUART7_IRQHandler - .long LPUART8_IRQHandler - .long LPI2C1_IRQHandler - .long LPI2C2_IRQHandler - .long LPI2C3_IRQHandler - .long LPI2C4_IRQHandler - .long LPSPI1_IRQHandler - .long LPSPI2_IRQHandler - .long LPSPI3_IRQHandler - .long LPSPI4_IRQHandler - .long CAN1_IRQHandler - .long CAN2_IRQHandler - .long FLEXRAM_IRQHandler - .long KPP_IRQHandler - .long TSC_DIG_IRQHandler - .long GPR_IRQ_IRQHandler - .long LCDIF_IRQHandler - .long CSI_IRQHandler - .long PXP_IRQHandler - .long WDOG2_IRQHandler - .long SNVS_HP_WRAPPER_IRQHandler - .long SNVS_HP_WRAPPER_TZ_IRQHandler - .long SNVS_LP_WRAPPER_IRQHandler - .long CSU_IRQHandler - .long DCP_IRQHandler - .long DCP_VMI_IRQHandler - .long Reserved68_IRQHandler - .long TRNG_IRQHandler - .long SJC_IRQHandler - .long BEE_IRQHandler - .long SAI1_IRQHandler - .long SAI2_IRQHandler - .long SAI3_RX_IRQHandler - .long SAI3_TX_IRQHandler - .long SPDIF_IRQHandler - .long PMU_EVENT_IRQHandler - .long Reserved78_IRQHandler - .long TEMP_LOW_HIGH_IRQHandler - .long TEMP_PANIC_IRQHandler - .long USB_PHY1_IRQHandler - .long USB_PHY2_IRQHandler - .long ADC1_IRQHandler - .long ADC2_IRQHandler - .long DCDC_IRQHandler - .long Reserved86_IRQHandler - .long Reserved87_IRQHandler - .long GPIO1_INT0_IRQHandler - .long GPIO1_INT1_IRQHandler - .long GPIO1_INT2_IRQHandler - .long GPIO1_INT3_IRQHandler - .long GPIO1_INT4_IRQHandler - .long GPIO1_INT5_IRQHandler - .long GPIO1_INT6_IRQHandler - .long GPIO1_INT7_IRQHandler - .long GPIO1_Combined_0_15_IRQHandler - .long GPIO1_Combined_16_31_IRQHandler - .long GPIO2_Combined_0_15_IRQHandler - .long GPIO2_Combined_16_31_IRQHandler - .long GPIO3_Combined_0_15_IRQHandler - .long GPIO3_Combined_16_31_IRQHandler - .long GPIO4_Combined_0_15_IRQHandler - .long GPIO4_Combined_16_31_IRQHandler - .long GPIO5_Combined_0_15_IRQHandler - .long GPIO5_Combined_16_31_IRQHandler - .long FLEXIO1_IRQHandler - .long FLEXIO2_IRQHandler - .long WDOG1_IRQHandler - .long RTWDOG_IRQHandler - .long EWM_IRQHandler - .long CCM_1_IRQHandler - .long CCM_2_IRQHandler - .long GPC_IRQHandler - .long SRC_IRQHandler - .long Reserved115_IRQHandler - .long GPT1_IRQHandler - .long GPT2_IRQHandler - .long PWM1_0_IRQHandler - .long PWM1_1_IRQHandler - .long PWM1_2_IRQHandler - .long PWM1_3_IRQHandler - .long PWM1_FAULT_IRQHandler - .long Reserved123_IRQHandler - .long FLEXSPI_IRQHandler - .long SEMC_IRQHandler - .long USDHC1_IRQHandler - .long USDHC2_IRQHandler - .long USB_OTG2_IRQHandler - .long USB_OTG1_IRQHandler - .long ENET_IRQHandler - .long ENET_1588_Timer_IRQHandler - .long XBAR1_IRQ_0_1_IRQHandler - .long XBAR1_IRQ_2_3_IRQHandler - .long ADC_ETC_IRQ0_IRQHandler - .long ADC_ETC_IRQ1_IRQHandler - .long ADC_ETC_IRQ2_IRQHandler - .long ADC_ETC_ERROR_IRQ_IRQHandler - .long PIT_IRQHandler - .long ACMP1_IRQHandler - .long ACMP2_IRQHandler - .long ACMP3_IRQHandler - .long ACMP4_IRQHandler - .long Reserved143_IRQHandler - .long Reserved144_IRQHandler - .long ENC1_IRQHandler - .long ENC2_IRQHandler - .long ENC3_IRQHandler - .long ENC4_IRQHandler - .long TMR1_IRQHandler - .long TMR2_IRQHandler - .long TMR3_IRQHandler - .long TMR4_IRQHandler - .long PWM2_0_IRQHandler - .long PWM2_1_IRQHandler - .long PWM2_2_IRQHandler - .long PWM2_3_IRQHandler - .long PWM2_FAULT_IRQHandler - .long PWM3_0_IRQHandler - .long PWM3_1_IRQHandler - .long PWM3_2_IRQHandler - .long PWM3_3_IRQHandler - .long PWM3_FAULT_IRQHandler - .long PWM4_0_IRQHandler - .long PWM4_1_IRQHandler - .long PWM4_2_IRQHandler - .long PWM4_3_IRQHandler - .long PWM4_FAULT_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ DMA0_DMA16_IRQHandler - IRQ DMA1_DMA17_IRQHandler - IRQ DMA2_DMA18_IRQHandler - IRQ DMA3_DMA19_IRQHandler - IRQ DMA4_DMA20_IRQHandler - IRQ DMA5_DMA21_IRQHandler - IRQ DMA6_DMA22_IRQHandler - IRQ DMA7_DMA23_IRQHandler - IRQ DMA8_DMA24_IRQHandler - IRQ DMA9_DMA25_IRQHandler - IRQ DMA10_DMA26_IRQHandler - IRQ DMA11_DMA27_IRQHandler - IRQ DMA12_DMA28_IRQHandler - IRQ DMA13_DMA29_IRQHandler - IRQ DMA14_DMA30_IRQHandler - IRQ DMA15_DMA31_IRQHandler - IRQ DMA_ERROR_IRQHandler - IRQ CTI0_ERROR_IRQHandler - IRQ CTI1_ERROR_IRQHandler - IRQ CORE_IRQHandler - IRQ LPUART1_IRQHandler - IRQ LPUART2_IRQHandler - IRQ LPUART3_IRQHandler - IRQ LPUART4_IRQHandler - IRQ LPUART5_IRQHandler - IRQ LPUART6_IRQHandler - IRQ LPUART7_IRQHandler - IRQ LPUART8_IRQHandler - IRQ LPI2C1_IRQHandler - IRQ LPI2C2_IRQHandler - IRQ LPI2C3_IRQHandler - IRQ LPI2C4_IRQHandler - IRQ LPSPI1_IRQHandler - IRQ LPSPI2_IRQHandler - IRQ LPSPI3_IRQHandler - IRQ LPSPI4_IRQHandler - IRQ CAN1_IRQHandler - IRQ CAN2_IRQHandler - IRQ FLEXRAM_IRQHandler - IRQ KPP_IRQHandler - IRQ TSC_DIG_IRQHandler - IRQ GPR_IRQ_IRQHandler - IRQ LCDIF_IRQHandler - IRQ CSI_IRQHandler - IRQ PXP_IRQHandler - IRQ WDOG2_IRQHandler - IRQ SNVS_HP_WRAPPER_IRQHandler - IRQ SNVS_HP_WRAPPER_TZ_IRQHandler - IRQ SNVS_LP_WRAPPER_IRQHandler - IRQ CSU_IRQHandler - IRQ DCP_IRQHandler - IRQ DCP_VMI_IRQHandler - IRQ Reserved68_IRQHandler - IRQ TRNG_IRQHandler - IRQ SJC_IRQHandler - IRQ BEE_IRQHandler - IRQ SAI1_IRQHandler - IRQ SAI2_IRQHandler - IRQ SAI3_RX_IRQHandler - IRQ SAI3_TX_IRQHandler - IRQ SPDIF_IRQHandler - IRQ PMU_EVENT_IRQHandler - IRQ Reserved78_IRQHandler - IRQ TEMP_LOW_HIGH_IRQHandler - IRQ TEMP_PANIC_IRQHandler - IRQ USB_PHY1_IRQHandler - IRQ USB_PHY2_IRQHandler - IRQ ADC1_IRQHandler - IRQ ADC2_IRQHandler - IRQ DCDC_IRQHandler - IRQ Reserved86_IRQHandler - IRQ Reserved87_IRQHandler - IRQ GPIO1_INT0_IRQHandler - IRQ GPIO1_INT1_IRQHandler - IRQ GPIO1_INT2_IRQHandler - IRQ GPIO1_INT3_IRQHandler - IRQ GPIO1_INT4_IRQHandler - IRQ GPIO1_INT5_IRQHandler - IRQ GPIO1_INT6_IRQHandler - IRQ GPIO1_INT7_IRQHandler - IRQ GPIO1_Combined_0_15_IRQHandler - IRQ GPIO1_Combined_16_31_IRQHandler - IRQ GPIO2_Combined_0_15_IRQHandler - IRQ GPIO2_Combined_16_31_IRQHandler - IRQ GPIO3_Combined_0_15_IRQHandler - IRQ GPIO3_Combined_16_31_IRQHandler - IRQ GPIO4_Combined_0_15_IRQHandler - IRQ GPIO4_Combined_16_31_IRQHandler - IRQ GPIO5_Combined_0_15_IRQHandler - IRQ GPIO5_Combined_16_31_IRQHandler - IRQ FLEXIO1_IRQHandler - IRQ FLEXIO2_IRQHandler - IRQ WDOG1_IRQHandler - IRQ RTWDOG_IRQHandler - IRQ EWM_IRQHandler - IRQ CCM_1_IRQHandler - IRQ CCM_2_IRQHandler - IRQ GPC_IRQHandler - IRQ SRC_IRQHandler - IRQ Reserved115_IRQHandler - IRQ GPT1_IRQHandler - IRQ GPT2_IRQHandler - IRQ PWM1_0_IRQHandler - IRQ PWM1_1_IRQHandler - IRQ PWM1_2_IRQHandler - IRQ PWM1_3_IRQHandler - IRQ PWM1_FAULT_IRQHandler - IRQ Reserved123_IRQHandler - IRQ FLEXSPI_IRQHandler - IRQ SEMC_IRQHandler - IRQ USDHC1_IRQHandler - IRQ USDHC2_IRQHandler - IRQ USB_OTG2_IRQHandler - IRQ USB_OTG1_IRQHandler - IRQ ENET_IRQHandler - IRQ ENET_1588_Timer_IRQHandler - IRQ XBAR1_IRQ_0_1_IRQHandler - IRQ XBAR1_IRQ_2_3_IRQHandler - IRQ ADC_ETC_IRQ0_IRQHandler - IRQ ADC_ETC_IRQ1_IRQHandler - IRQ ADC_ETC_IRQ2_IRQHandler - IRQ ADC_ETC_ERROR_IRQ_IRQHandler - IRQ PIT_IRQHandler - IRQ ACMP1_IRQHandler - IRQ ACMP2_IRQHandler - IRQ ACMP3_IRQHandler - IRQ ACMP4_IRQHandler - IRQ Reserved143_IRQHandler - IRQ Reserved144_IRQHandler - IRQ ENC1_IRQHandler - IRQ ENC2_IRQHandler - IRQ ENC3_IRQHandler - IRQ ENC4_IRQHandler - IRQ TMR1_IRQHandler - IRQ TMR2_IRQHandler - IRQ TMR3_IRQHandler - IRQ TMR4_IRQHandler - IRQ PWM2_0_IRQHandler - IRQ PWM2_1_IRQHandler - IRQ PWM2_2_IRQHandler - IRQ PWM2_3_IRQHandler - IRQ PWM2_FAULT_IRQHandler - IRQ PWM3_0_IRQHandler - IRQ PWM3_1_IRQHandler - IRQ PWM3_2_IRQHandler - IRQ PWM3_3_IRQHandler - IRQ PWM3_FAULT_IRQHandler - IRQ PWM4_0_IRQHandler - IRQ PWM4_1_IRQHandler - IRQ PWM4_2_IRQHandler - IRQ PWM4_3_IRQHandler - IRQ PWM4_FAULT_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/mimxrt1062.go b/device/nxp/mimxrt1062.go index 3686cfe..2224a28 100644 --- a/device/nxp/mimxrt1062.go +++ b/device/nxp/mimxrt1062.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -505,8 +505,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export DMA0_DMA16_IRQHandler func interruptDMA0_DMA16() { diff --git a/device/nxp/mimxrt1062.s b/device/nxp/mimxrt1062.s deleted file mode 100644 index 03936bb..0000000 --- a/device/nxp/mimxrt1062.s +++ /dev/null @@ -1,383 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from MIMXRT1062.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// MIMXRT1062DVL6A -*/ - -// Copyright 2016-2019 NXP All rights reserved. SPDX-License-Identifier: BSD-3-Clause - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long DMA0_DMA16_IRQHandler - .long DMA1_DMA17_IRQHandler - .long DMA2_DMA18_IRQHandler - .long DMA3_DMA19_IRQHandler - .long DMA4_DMA20_IRQHandler - .long DMA5_DMA21_IRQHandler - .long DMA6_DMA22_IRQHandler - .long DMA7_DMA23_IRQHandler - .long DMA8_DMA24_IRQHandler - .long DMA9_DMA25_IRQHandler - .long DMA10_DMA26_IRQHandler - .long DMA11_DMA27_IRQHandler - .long DMA12_DMA28_IRQHandler - .long DMA13_DMA29_IRQHandler - .long DMA14_DMA30_IRQHandler - .long DMA15_DMA31_IRQHandler - .long DMA_ERROR_IRQHandler - .long CTI0_ERROR_IRQHandler - .long CTI1_ERROR_IRQHandler - .long CORE_IRQHandler - .long LPUART1_IRQHandler - .long LPUART2_IRQHandler - .long LPUART3_IRQHandler - .long LPUART4_IRQHandler - .long LPUART5_IRQHandler - .long LPUART6_IRQHandler - .long LPUART7_IRQHandler - .long LPUART8_IRQHandler - .long LPI2C1_IRQHandler - .long LPI2C2_IRQHandler - .long LPI2C3_IRQHandler - .long LPI2C4_IRQHandler - .long LPSPI1_IRQHandler - .long LPSPI2_IRQHandler - .long LPSPI3_IRQHandler - .long LPSPI4_IRQHandler - .long CAN1_IRQHandler - .long CAN2_IRQHandler - .long FLEXRAM_IRQHandler - .long KPP_IRQHandler - .long TSC_DIG_IRQHandler - .long GPR_IRQ_IRQHandler - .long LCDIF_IRQHandler - .long CSI_IRQHandler - .long PXP_IRQHandler - .long WDOG2_IRQHandler - .long SNVS_HP_WRAPPER_IRQHandler - .long SNVS_HP_WRAPPER_TZ_IRQHandler - .long SNVS_LP_WRAPPER_IRQHandler - .long CSU_IRQHandler - .long DCP_IRQHandler - .long DCP_VMI_IRQHandler - .long Reserved68_IRQHandler - .long TRNG_IRQHandler - .long SJC_IRQHandler - .long BEE_IRQHandler - .long SAI1_IRQHandler - .long SAI2_IRQHandler - .long SAI3_RX_IRQHandler - .long SAI3_TX_IRQHandler - .long SPDIF_IRQHandler - .long PMU_EVENT_IRQHandler - .long Reserved78_IRQHandler - .long TEMP_LOW_HIGH_IRQHandler - .long TEMP_PANIC_IRQHandler - .long USB_PHY1_IRQHandler - .long USB_PHY2_IRQHandler - .long ADC1_IRQHandler - .long ADC2_IRQHandler - .long DCDC_IRQHandler - .long Reserved86_IRQHandler - .long Reserved87_IRQHandler - .long GPIO1_INT0_IRQHandler - .long GPIO1_INT1_IRQHandler - .long GPIO1_INT2_IRQHandler - .long GPIO1_INT3_IRQHandler - .long GPIO1_INT4_IRQHandler - .long GPIO1_INT5_IRQHandler - .long GPIO1_INT6_IRQHandler - .long GPIO1_INT7_IRQHandler - .long GPIO1_Combined_0_15_IRQHandler - .long GPIO1_Combined_16_31_IRQHandler - .long GPIO2_Combined_0_15_IRQHandler - .long GPIO2_Combined_16_31_IRQHandler - .long GPIO3_Combined_0_15_IRQHandler - .long GPIO3_Combined_16_31_IRQHandler - .long GPIO4_Combined_0_15_IRQHandler - .long GPIO4_Combined_16_31_IRQHandler - .long GPIO5_Combined_0_15_IRQHandler - .long GPIO5_Combined_16_31_IRQHandler - .long FLEXIO1_IRQHandler - .long FLEXIO2_IRQHandler - .long WDOG1_IRQHandler - .long RTWDOG_IRQHandler - .long EWM_IRQHandler - .long CCM_1_IRQHandler - .long CCM_2_IRQHandler - .long GPC_IRQHandler - .long SRC_IRQHandler - .long Reserved115_IRQHandler - .long GPT1_IRQHandler - .long GPT2_IRQHandler - .long PWM1_0_IRQHandler - .long PWM1_1_IRQHandler - .long PWM1_2_IRQHandler - .long PWM1_3_IRQHandler - .long PWM1_FAULT_IRQHandler - .long FLEXSPI2_IRQHandler - .long FLEXSPI_IRQHandler - .long SEMC_IRQHandler - .long USDHC1_IRQHandler - .long USDHC2_IRQHandler - .long USB_OTG2_IRQHandler - .long USB_OTG1_IRQHandler - .long ENET_IRQHandler - .long ENET_1588_Timer_IRQHandler - .long XBAR1_IRQ_0_1_IRQHandler - .long XBAR1_IRQ_2_3_IRQHandler - .long ADC_ETC_IRQ0_IRQHandler - .long ADC_ETC_IRQ1_IRQHandler - .long ADC_ETC_IRQ2_IRQHandler - .long ADC_ETC_ERROR_IRQ_IRQHandler - .long PIT_IRQHandler - .long ACMP1_IRQHandler - .long ACMP2_IRQHandler - .long ACMP3_IRQHandler - .long ACMP4_IRQHandler - .long Reserved143_IRQHandler - .long Reserved144_IRQHandler - .long ENC1_IRQHandler - .long ENC2_IRQHandler - .long ENC3_IRQHandler - .long ENC4_IRQHandler - .long TMR1_IRQHandler - .long TMR2_IRQHandler - .long TMR3_IRQHandler - .long TMR4_IRQHandler - .long PWM2_0_IRQHandler - .long PWM2_1_IRQHandler - .long PWM2_2_IRQHandler - .long PWM2_3_IRQHandler - .long PWM2_FAULT_IRQHandler - .long PWM3_0_IRQHandler - .long PWM3_1_IRQHandler - .long PWM3_2_IRQHandler - .long PWM3_3_IRQHandler - .long PWM3_FAULT_IRQHandler - .long PWM4_0_IRQHandler - .long PWM4_1_IRQHandler - .long PWM4_2_IRQHandler - .long PWM4_3_IRQHandler - .long PWM4_FAULT_IRQHandler - .long ENET2_IRQHandler - .long ENET2_1588_Timer_IRQHandler - .long CAN3_IRQHandler - .long Reserved171_IRQHandler - .long FLEXIO3_IRQHandler - .long GPIO6_7_8_9_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ DMA0_DMA16_IRQHandler - IRQ DMA1_DMA17_IRQHandler - IRQ DMA2_DMA18_IRQHandler - IRQ DMA3_DMA19_IRQHandler - IRQ DMA4_DMA20_IRQHandler - IRQ DMA5_DMA21_IRQHandler - IRQ DMA6_DMA22_IRQHandler - IRQ DMA7_DMA23_IRQHandler - IRQ DMA8_DMA24_IRQHandler - IRQ DMA9_DMA25_IRQHandler - IRQ DMA10_DMA26_IRQHandler - IRQ DMA11_DMA27_IRQHandler - IRQ DMA12_DMA28_IRQHandler - IRQ DMA13_DMA29_IRQHandler - IRQ DMA14_DMA30_IRQHandler - IRQ DMA15_DMA31_IRQHandler - IRQ DMA_ERROR_IRQHandler - IRQ CTI0_ERROR_IRQHandler - IRQ CTI1_ERROR_IRQHandler - IRQ CORE_IRQHandler - IRQ LPUART1_IRQHandler - IRQ LPUART2_IRQHandler - IRQ LPUART3_IRQHandler - IRQ LPUART4_IRQHandler - IRQ LPUART5_IRQHandler - IRQ LPUART6_IRQHandler - IRQ LPUART7_IRQHandler - IRQ LPUART8_IRQHandler - IRQ LPI2C1_IRQHandler - IRQ LPI2C2_IRQHandler - IRQ LPI2C3_IRQHandler - IRQ LPI2C4_IRQHandler - IRQ LPSPI1_IRQHandler - IRQ LPSPI2_IRQHandler - IRQ LPSPI3_IRQHandler - IRQ LPSPI4_IRQHandler - IRQ CAN1_IRQHandler - IRQ CAN2_IRQHandler - IRQ FLEXRAM_IRQHandler - IRQ KPP_IRQHandler - IRQ TSC_DIG_IRQHandler - IRQ GPR_IRQ_IRQHandler - IRQ LCDIF_IRQHandler - IRQ CSI_IRQHandler - IRQ PXP_IRQHandler - IRQ WDOG2_IRQHandler - IRQ SNVS_HP_WRAPPER_IRQHandler - IRQ SNVS_HP_WRAPPER_TZ_IRQHandler - IRQ SNVS_LP_WRAPPER_IRQHandler - IRQ CSU_IRQHandler - IRQ DCP_IRQHandler - IRQ DCP_VMI_IRQHandler - IRQ Reserved68_IRQHandler - IRQ TRNG_IRQHandler - IRQ SJC_IRQHandler - IRQ BEE_IRQHandler - IRQ SAI1_IRQHandler - IRQ SAI2_IRQHandler - IRQ SAI3_RX_IRQHandler - IRQ SAI3_TX_IRQHandler - IRQ SPDIF_IRQHandler - IRQ PMU_EVENT_IRQHandler - IRQ Reserved78_IRQHandler - IRQ TEMP_LOW_HIGH_IRQHandler - IRQ TEMP_PANIC_IRQHandler - IRQ USB_PHY1_IRQHandler - IRQ USB_PHY2_IRQHandler - IRQ ADC1_IRQHandler - IRQ ADC2_IRQHandler - IRQ DCDC_IRQHandler - IRQ Reserved86_IRQHandler - IRQ Reserved87_IRQHandler - IRQ GPIO1_INT0_IRQHandler - IRQ GPIO1_INT1_IRQHandler - IRQ GPIO1_INT2_IRQHandler - IRQ GPIO1_INT3_IRQHandler - IRQ GPIO1_INT4_IRQHandler - IRQ GPIO1_INT5_IRQHandler - IRQ GPIO1_INT6_IRQHandler - IRQ GPIO1_INT7_IRQHandler - IRQ GPIO1_Combined_0_15_IRQHandler - IRQ GPIO1_Combined_16_31_IRQHandler - IRQ GPIO2_Combined_0_15_IRQHandler - IRQ GPIO2_Combined_16_31_IRQHandler - IRQ GPIO3_Combined_0_15_IRQHandler - IRQ GPIO3_Combined_16_31_IRQHandler - IRQ GPIO4_Combined_0_15_IRQHandler - IRQ GPIO4_Combined_16_31_IRQHandler - IRQ GPIO5_Combined_0_15_IRQHandler - IRQ GPIO5_Combined_16_31_IRQHandler - IRQ FLEXIO1_IRQHandler - IRQ FLEXIO2_IRQHandler - IRQ WDOG1_IRQHandler - IRQ RTWDOG_IRQHandler - IRQ EWM_IRQHandler - IRQ CCM_1_IRQHandler - IRQ CCM_2_IRQHandler - IRQ GPC_IRQHandler - IRQ SRC_IRQHandler - IRQ Reserved115_IRQHandler - IRQ GPT1_IRQHandler - IRQ GPT2_IRQHandler - IRQ PWM1_0_IRQHandler - IRQ PWM1_1_IRQHandler - IRQ PWM1_2_IRQHandler - IRQ PWM1_3_IRQHandler - IRQ PWM1_FAULT_IRQHandler - IRQ FLEXSPI2_IRQHandler - IRQ FLEXSPI_IRQHandler - IRQ SEMC_IRQHandler - IRQ USDHC1_IRQHandler - IRQ USDHC2_IRQHandler - IRQ USB_OTG2_IRQHandler - IRQ USB_OTG1_IRQHandler - IRQ ENET_IRQHandler - IRQ ENET_1588_Timer_IRQHandler - IRQ XBAR1_IRQ_0_1_IRQHandler - IRQ XBAR1_IRQ_2_3_IRQHandler - IRQ ADC_ETC_IRQ0_IRQHandler - IRQ ADC_ETC_IRQ1_IRQHandler - IRQ ADC_ETC_IRQ2_IRQHandler - IRQ ADC_ETC_ERROR_IRQ_IRQHandler - IRQ PIT_IRQHandler - IRQ ACMP1_IRQHandler - IRQ ACMP2_IRQHandler - IRQ ACMP3_IRQHandler - IRQ ACMP4_IRQHandler - IRQ Reserved143_IRQHandler - IRQ Reserved144_IRQHandler - IRQ ENC1_IRQHandler - IRQ ENC2_IRQHandler - IRQ ENC3_IRQHandler - IRQ ENC4_IRQHandler - IRQ TMR1_IRQHandler - IRQ TMR2_IRQHandler - IRQ TMR3_IRQHandler - IRQ TMR4_IRQHandler - IRQ PWM2_0_IRQHandler - IRQ PWM2_1_IRQHandler - IRQ PWM2_2_IRQHandler - IRQ PWM2_3_IRQHandler - IRQ PWM2_FAULT_IRQHandler - IRQ PWM3_0_IRQHandler - IRQ PWM3_1_IRQHandler - IRQ PWM3_2_IRQHandler - IRQ PWM3_3_IRQHandler - IRQ PWM3_FAULT_IRQHandler - IRQ PWM4_0_IRQHandler - IRQ PWM4_1_IRQHandler - IRQ PWM4_2_IRQHandler - IRQ PWM4_3_IRQHandler - IRQ PWM4_FAULT_IRQHandler - IRQ ENET2_IRQHandler - IRQ ENET2_1588_Timer_IRQHandler - IRQ CAN3_IRQHandler - IRQ Reserved171_IRQHandler - IRQ FLEXIO3_IRQHandler - IRQ GPIO6_7_8_9_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/mimxrt1062_clock.go b/device/nxp/mimxrt1062_clock.go index 77409ba..16c6a1b 100644 --- a/device/nxp/mimxrt1062_clock.go +++ b/device/nxp/mimxrt1062_clock.go @@ -7,7 +7,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) diff --git a/device/nxp/mimxrt1062_mpu.go b/device/nxp/mimxrt1062_mpu.go index e5dbfb7..369e246 100644 --- a/device/nxp/mimxrt1062_mpu.go +++ b/device/nxp/mimxrt1062_mpu.go @@ -7,8 +7,8 @@ package nxp import ( - "device/arm" - "runtime/volatile" + "github.com/goplus/emb/device/arm" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) diff --git a/device/nxp/mimxrt1064.go b/device/nxp/mimxrt1064.go index f19d372..6d6a4f0 100644 --- a/device/nxp/mimxrt1064.go +++ b/device/nxp/mimxrt1064.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -505,8 +505,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export DMA0_DMA16_IRQHandler func interruptDMA0_DMA16() { diff --git a/device/nxp/mimxrt1064.s b/device/nxp/mimxrt1064.s deleted file mode 100644 index 6cdcfee..0000000 --- a/device/nxp/mimxrt1064.s +++ /dev/null @@ -1,383 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from MIMXRT1064.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// MIMXRT1064DVL6A -*/ - -// Copyright 2016-2019 NXP All rights reserved. SPDX-License-Identifier: BSD-3-Clause - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long DMA0_DMA16_IRQHandler - .long DMA1_DMA17_IRQHandler - .long DMA2_DMA18_IRQHandler - .long DMA3_DMA19_IRQHandler - .long DMA4_DMA20_IRQHandler - .long DMA5_DMA21_IRQHandler - .long DMA6_DMA22_IRQHandler - .long DMA7_DMA23_IRQHandler - .long DMA8_DMA24_IRQHandler - .long DMA9_DMA25_IRQHandler - .long DMA10_DMA26_IRQHandler - .long DMA11_DMA27_IRQHandler - .long DMA12_DMA28_IRQHandler - .long DMA13_DMA29_IRQHandler - .long DMA14_DMA30_IRQHandler - .long DMA15_DMA31_IRQHandler - .long DMA_ERROR_IRQHandler - .long CTI0_ERROR_IRQHandler - .long CTI1_ERROR_IRQHandler - .long CORE_IRQHandler - .long LPUART1_IRQHandler - .long LPUART2_IRQHandler - .long LPUART3_IRQHandler - .long LPUART4_IRQHandler - .long LPUART5_IRQHandler - .long LPUART6_IRQHandler - .long LPUART7_IRQHandler - .long LPUART8_IRQHandler - .long LPI2C1_IRQHandler - .long LPI2C2_IRQHandler - .long LPI2C3_IRQHandler - .long LPI2C4_IRQHandler - .long LPSPI1_IRQHandler - .long LPSPI2_IRQHandler - .long LPSPI3_IRQHandler - .long LPSPI4_IRQHandler - .long CAN1_IRQHandler - .long CAN2_IRQHandler - .long FLEXRAM_IRQHandler - .long KPP_IRQHandler - .long TSC_DIG_IRQHandler - .long GPR_IRQ_IRQHandler - .long LCDIF_IRQHandler - .long CSI_IRQHandler - .long PXP_IRQHandler - .long WDOG2_IRQHandler - .long SNVS_HP_WRAPPER_IRQHandler - .long SNVS_HP_WRAPPER_TZ_IRQHandler - .long SNVS_LP_WRAPPER_IRQHandler - .long CSU_IRQHandler - .long DCP_IRQHandler - .long DCP_VMI_IRQHandler - .long Reserved68_IRQHandler - .long TRNG_IRQHandler - .long SJC_IRQHandler - .long BEE_IRQHandler - .long SAI1_IRQHandler - .long SAI2_IRQHandler - .long SAI3_RX_IRQHandler - .long SAI3_TX_IRQHandler - .long SPDIF_IRQHandler - .long PMU_EVENT_IRQHandler - .long Reserved78_IRQHandler - .long TEMP_LOW_HIGH_IRQHandler - .long TEMP_PANIC_IRQHandler - .long USB_PHY1_IRQHandler - .long USB_PHY2_IRQHandler - .long ADC1_IRQHandler - .long ADC2_IRQHandler - .long DCDC_IRQHandler - .long Reserved86_IRQHandler - .long Reserved87_IRQHandler - .long GPIO1_INT0_IRQHandler - .long GPIO1_INT1_IRQHandler - .long GPIO1_INT2_IRQHandler - .long GPIO1_INT3_IRQHandler - .long GPIO1_INT4_IRQHandler - .long GPIO1_INT5_IRQHandler - .long GPIO1_INT6_IRQHandler - .long GPIO1_INT7_IRQHandler - .long GPIO1_Combined_0_15_IRQHandler - .long GPIO1_Combined_16_31_IRQHandler - .long GPIO2_Combined_0_15_IRQHandler - .long GPIO2_Combined_16_31_IRQHandler - .long GPIO3_Combined_0_15_IRQHandler - .long GPIO3_Combined_16_31_IRQHandler - .long GPIO4_Combined_0_15_IRQHandler - .long GPIO4_Combined_16_31_IRQHandler - .long GPIO5_Combined_0_15_IRQHandler - .long GPIO5_Combined_16_31_IRQHandler - .long FLEXIO1_IRQHandler - .long FLEXIO2_IRQHandler - .long WDOG1_IRQHandler - .long RTWDOG_IRQHandler - .long EWM_IRQHandler - .long CCM_1_IRQHandler - .long CCM_2_IRQHandler - .long GPC_IRQHandler - .long SRC_IRQHandler - .long Reserved115_IRQHandler - .long GPT1_IRQHandler - .long GPT2_IRQHandler - .long PWM1_0_IRQHandler - .long PWM1_1_IRQHandler - .long PWM1_2_IRQHandler - .long PWM1_3_IRQHandler - .long PWM1_FAULT_IRQHandler - .long FLEXSPI2_IRQHandler - .long FLEXSPI_IRQHandler - .long SEMC_IRQHandler - .long USDHC1_IRQHandler - .long USDHC2_IRQHandler - .long USB_OTG2_IRQHandler - .long USB_OTG1_IRQHandler - .long ENET_IRQHandler - .long ENET_1588_Timer_IRQHandler - .long XBAR1_IRQ_0_1_IRQHandler - .long XBAR1_IRQ_2_3_IRQHandler - .long ADC_ETC_IRQ0_IRQHandler - .long ADC_ETC_IRQ1_IRQHandler - .long ADC_ETC_IRQ2_IRQHandler - .long ADC_ETC_ERROR_IRQ_IRQHandler - .long PIT_IRQHandler - .long ACMP1_IRQHandler - .long ACMP2_IRQHandler - .long ACMP3_IRQHandler - .long ACMP4_IRQHandler - .long Reserved143_IRQHandler - .long Reserved144_IRQHandler - .long ENC1_IRQHandler - .long ENC2_IRQHandler - .long ENC3_IRQHandler - .long ENC4_IRQHandler - .long TMR1_IRQHandler - .long TMR2_IRQHandler - .long TMR3_IRQHandler - .long TMR4_IRQHandler - .long PWM2_0_IRQHandler - .long PWM2_1_IRQHandler - .long PWM2_2_IRQHandler - .long PWM2_3_IRQHandler - .long PWM2_FAULT_IRQHandler - .long PWM3_0_IRQHandler - .long PWM3_1_IRQHandler - .long PWM3_2_IRQHandler - .long PWM3_3_IRQHandler - .long PWM3_FAULT_IRQHandler - .long PWM4_0_IRQHandler - .long PWM4_1_IRQHandler - .long PWM4_2_IRQHandler - .long PWM4_3_IRQHandler - .long PWM4_FAULT_IRQHandler - .long ENET2_IRQHandler - .long ENET2_1588_Timer_IRQHandler - .long CAN3_IRQHandler - .long Reserved171_IRQHandler - .long FLEXIO3_IRQHandler - .long GPIO6_7_8_9_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ DMA0_DMA16_IRQHandler - IRQ DMA1_DMA17_IRQHandler - IRQ DMA2_DMA18_IRQHandler - IRQ DMA3_DMA19_IRQHandler - IRQ DMA4_DMA20_IRQHandler - IRQ DMA5_DMA21_IRQHandler - IRQ DMA6_DMA22_IRQHandler - IRQ DMA7_DMA23_IRQHandler - IRQ DMA8_DMA24_IRQHandler - IRQ DMA9_DMA25_IRQHandler - IRQ DMA10_DMA26_IRQHandler - IRQ DMA11_DMA27_IRQHandler - IRQ DMA12_DMA28_IRQHandler - IRQ DMA13_DMA29_IRQHandler - IRQ DMA14_DMA30_IRQHandler - IRQ DMA15_DMA31_IRQHandler - IRQ DMA_ERROR_IRQHandler - IRQ CTI0_ERROR_IRQHandler - IRQ CTI1_ERROR_IRQHandler - IRQ CORE_IRQHandler - IRQ LPUART1_IRQHandler - IRQ LPUART2_IRQHandler - IRQ LPUART3_IRQHandler - IRQ LPUART4_IRQHandler - IRQ LPUART5_IRQHandler - IRQ LPUART6_IRQHandler - IRQ LPUART7_IRQHandler - IRQ LPUART8_IRQHandler - IRQ LPI2C1_IRQHandler - IRQ LPI2C2_IRQHandler - IRQ LPI2C3_IRQHandler - IRQ LPI2C4_IRQHandler - IRQ LPSPI1_IRQHandler - IRQ LPSPI2_IRQHandler - IRQ LPSPI3_IRQHandler - IRQ LPSPI4_IRQHandler - IRQ CAN1_IRQHandler - IRQ CAN2_IRQHandler - IRQ FLEXRAM_IRQHandler - IRQ KPP_IRQHandler - IRQ TSC_DIG_IRQHandler - IRQ GPR_IRQ_IRQHandler - IRQ LCDIF_IRQHandler - IRQ CSI_IRQHandler - IRQ PXP_IRQHandler - IRQ WDOG2_IRQHandler - IRQ SNVS_HP_WRAPPER_IRQHandler - IRQ SNVS_HP_WRAPPER_TZ_IRQHandler - IRQ SNVS_LP_WRAPPER_IRQHandler - IRQ CSU_IRQHandler - IRQ DCP_IRQHandler - IRQ DCP_VMI_IRQHandler - IRQ Reserved68_IRQHandler - IRQ TRNG_IRQHandler - IRQ SJC_IRQHandler - IRQ BEE_IRQHandler - IRQ SAI1_IRQHandler - IRQ SAI2_IRQHandler - IRQ SAI3_RX_IRQHandler - IRQ SAI3_TX_IRQHandler - IRQ SPDIF_IRQHandler - IRQ PMU_EVENT_IRQHandler - IRQ Reserved78_IRQHandler - IRQ TEMP_LOW_HIGH_IRQHandler - IRQ TEMP_PANIC_IRQHandler - IRQ USB_PHY1_IRQHandler - IRQ USB_PHY2_IRQHandler - IRQ ADC1_IRQHandler - IRQ ADC2_IRQHandler - IRQ DCDC_IRQHandler - IRQ Reserved86_IRQHandler - IRQ Reserved87_IRQHandler - IRQ GPIO1_INT0_IRQHandler - IRQ GPIO1_INT1_IRQHandler - IRQ GPIO1_INT2_IRQHandler - IRQ GPIO1_INT3_IRQHandler - IRQ GPIO1_INT4_IRQHandler - IRQ GPIO1_INT5_IRQHandler - IRQ GPIO1_INT6_IRQHandler - IRQ GPIO1_INT7_IRQHandler - IRQ GPIO1_Combined_0_15_IRQHandler - IRQ GPIO1_Combined_16_31_IRQHandler - IRQ GPIO2_Combined_0_15_IRQHandler - IRQ GPIO2_Combined_16_31_IRQHandler - IRQ GPIO3_Combined_0_15_IRQHandler - IRQ GPIO3_Combined_16_31_IRQHandler - IRQ GPIO4_Combined_0_15_IRQHandler - IRQ GPIO4_Combined_16_31_IRQHandler - IRQ GPIO5_Combined_0_15_IRQHandler - IRQ GPIO5_Combined_16_31_IRQHandler - IRQ FLEXIO1_IRQHandler - IRQ FLEXIO2_IRQHandler - IRQ WDOG1_IRQHandler - IRQ RTWDOG_IRQHandler - IRQ EWM_IRQHandler - IRQ CCM_1_IRQHandler - IRQ CCM_2_IRQHandler - IRQ GPC_IRQHandler - IRQ SRC_IRQHandler - IRQ Reserved115_IRQHandler - IRQ GPT1_IRQHandler - IRQ GPT2_IRQHandler - IRQ PWM1_0_IRQHandler - IRQ PWM1_1_IRQHandler - IRQ PWM1_2_IRQHandler - IRQ PWM1_3_IRQHandler - IRQ PWM1_FAULT_IRQHandler - IRQ FLEXSPI2_IRQHandler - IRQ FLEXSPI_IRQHandler - IRQ SEMC_IRQHandler - IRQ USDHC1_IRQHandler - IRQ USDHC2_IRQHandler - IRQ USB_OTG2_IRQHandler - IRQ USB_OTG1_IRQHandler - IRQ ENET_IRQHandler - IRQ ENET_1588_Timer_IRQHandler - IRQ XBAR1_IRQ_0_1_IRQHandler - IRQ XBAR1_IRQ_2_3_IRQHandler - IRQ ADC_ETC_IRQ0_IRQHandler - IRQ ADC_ETC_IRQ1_IRQHandler - IRQ ADC_ETC_IRQ2_IRQHandler - IRQ ADC_ETC_ERROR_IRQ_IRQHandler - IRQ PIT_IRQHandler - IRQ ACMP1_IRQHandler - IRQ ACMP2_IRQHandler - IRQ ACMP3_IRQHandler - IRQ ACMP4_IRQHandler - IRQ Reserved143_IRQHandler - IRQ Reserved144_IRQHandler - IRQ ENC1_IRQHandler - IRQ ENC2_IRQHandler - IRQ ENC3_IRQHandler - IRQ ENC4_IRQHandler - IRQ TMR1_IRQHandler - IRQ TMR2_IRQHandler - IRQ TMR3_IRQHandler - IRQ TMR4_IRQHandler - IRQ PWM2_0_IRQHandler - IRQ PWM2_1_IRQHandler - IRQ PWM2_2_IRQHandler - IRQ PWM2_3_IRQHandler - IRQ PWM2_FAULT_IRQHandler - IRQ PWM3_0_IRQHandler - IRQ PWM3_1_IRQHandler - IRQ PWM3_2_IRQHandler - IRQ PWM3_3_IRQHandler - IRQ PWM3_FAULT_IRQHandler - IRQ PWM4_0_IRQHandler - IRQ PWM4_1_IRQHandler - IRQ PWM4_2_IRQHandler - IRQ PWM4_3_IRQHandler - IRQ PWM4_FAULT_IRQHandler - IRQ ENET2_IRQHandler - IRQ ENET2_1588_Timer_IRQHandler - IRQ CAN3_IRQHandler - IRQ Reserved171_IRQHandler - IRQ FLEXIO3_IRQHandler - IRQ GPIO6_7_8_9_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/mk22f25612.go b/device/nxp/mk22f25612.go index 1c83a33..84001de 100644 --- a/device/nxp/mk22f25612.go +++ b/device/nxp/mk22f25612.go @@ -28,7 +28,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -226,8 +226,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export DMA0_IRQHandler func interruptDMA0() { diff --git a/device/nxp/mk22f25612.s b/device/nxp/mk22f25612.s deleted file mode 100644 index 0dec90d..0000000 --- a/device/nxp/mk22f25612.s +++ /dev/null @@ -1,218 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from MK22F25612.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// MK22F25612 NXP Microcontroller -*/ - -// Redistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met: -// o Redistributions of source code must retain the above copyright notice, this list -// of conditions and the following disclaimer. -// o Redistributions in binary form must reproduce the above copyright notice, this -// list of conditions and the following disclaimer in the documentation and/or -// other materials provided with the distribution. -// o Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long DMA0_IRQHandler - .long DMA1_IRQHandler - .long DMA2_IRQHandler - .long DMA3_IRQHandler - .long DMA4_IRQHandler - .long DMA5_IRQHandler - .long DMA6_IRQHandler - .long DMA7_IRQHandler - .long DMA8_IRQHandler - .long DMA9_IRQHandler - .long DMA10_IRQHandler - .long DMA11_IRQHandler - .long DMA12_IRQHandler - .long DMA13_IRQHandler - .long DMA14_IRQHandler - .long DMA15_IRQHandler - .long DMA_Error_IRQHandler - .long MCM_IRQHandler - .long FTF_IRQHandler - .long Read_Collision_IRQHandler - .long LVD_LVW_IRQHandler - .long LLWU_IRQHandler - .long WDOG_EWM_IRQHandler - .long RNG_IRQHandler - .long I2C0_IRQHandler - .long I2C1_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long I2S0_Tx_IRQHandler - .long I2S0_Rx_IRQHandler - .long LPUART0_IRQHandler - .long UART0_RX_TX_IRQHandler - .long UART0_ERR_IRQHandler - .long UART1_RX_TX_IRQHandler - .long UART1_ERR_IRQHandler - .long UART2_RX_TX_IRQHandler - .long UART2_ERR_IRQHandler - .long 0 - .long 0 - .long ADC0_IRQHandler - .long CMP0_IRQHandler - .long CMP1_IRQHandler - .long FTM0_IRQHandler - .long FTM1_IRQHandler - .long FTM2_IRQHandler - .long 0 - .long RTC_IRQHandler - .long RTC_Seconds_IRQHandler - .long PIT0_IRQHandler - .long PIT1_IRQHandler - .long PIT2_IRQHandler - .long PIT3_IRQHandler - .long PDB0_IRQHandler - .long USB0_IRQHandler - .long 0 - .long 0 - .long DAC0_IRQHandler - .long 0 - .long LPTMR0_IRQHandler - .long PORTA_IRQHandler - .long PORTB_IRQHandler - .long PORTC_IRQHandler - .long PORTD_IRQHandler - .long PORTE_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long ADC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ DMA0_IRQHandler - IRQ DMA1_IRQHandler - IRQ DMA2_IRQHandler - IRQ DMA3_IRQHandler - IRQ DMA4_IRQHandler - IRQ DMA5_IRQHandler - IRQ DMA6_IRQHandler - IRQ DMA7_IRQHandler - IRQ DMA8_IRQHandler - IRQ DMA9_IRQHandler - IRQ DMA10_IRQHandler - IRQ DMA11_IRQHandler - IRQ DMA12_IRQHandler - IRQ DMA13_IRQHandler - IRQ DMA14_IRQHandler - IRQ DMA15_IRQHandler - IRQ DMA_Error_IRQHandler - IRQ MCM_IRQHandler - IRQ FTF_IRQHandler - IRQ Read_Collision_IRQHandler - IRQ LVD_LVW_IRQHandler - IRQ LLWU_IRQHandler - IRQ WDOG_EWM_IRQHandler - IRQ RNG_IRQHandler - IRQ I2C0_IRQHandler - IRQ I2C1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ I2S0_Tx_IRQHandler - IRQ I2S0_Rx_IRQHandler - IRQ LPUART0_IRQHandler - IRQ UART0_RX_TX_IRQHandler - IRQ UART0_ERR_IRQHandler - IRQ UART1_RX_TX_IRQHandler - IRQ UART1_ERR_IRQHandler - IRQ UART2_RX_TX_IRQHandler - IRQ UART2_ERR_IRQHandler - IRQ ADC0_IRQHandler - IRQ CMP0_IRQHandler - IRQ CMP1_IRQHandler - IRQ FTM0_IRQHandler - IRQ FTM1_IRQHandler - IRQ FTM2_IRQHandler - IRQ RTC_IRQHandler - IRQ RTC_Seconds_IRQHandler - IRQ PIT0_IRQHandler - IRQ PIT1_IRQHandler - IRQ PIT2_IRQHandler - IRQ PIT3_IRQHandler - IRQ PDB0_IRQHandler - IRQ USB0_IRQHandler - IRQ DAC0_IRQHandler - IRQ LPTMR0_IRQHandler - IRQ PORTA_IRQHandler - IRQ PORTB_IRQHandler - IRQ PORTC_IRQHandler - IRQ PORTD_IRQHandler - IRQ PORTE_IRQHandler - IRQ ADC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/mk22f51212.go b/device/nxp/mk22f51212.go index 07dd852..a248068 100644 --- a/device/nxp/mk22f51212.go +++ b/device/nxp/mk22f51212.go @@ -28,7 +28,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -232,8 +232,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export DMA0_IRQHandler func interruptDMA0() { diff --git a/device/nxp/mk22f51212.s b/device/nxp/mk22f51212.s deleted file mode 100644 index 94f267f..0000000 --- a/device/nxp/mk22f51212.s +++ /dev/null @@ -1,220 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from MK22F51212.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// MK22F51212 NXP Microcontroller -*/ - -// Redistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met: -// o Redistributions of source code must retain the above copyright notice, this list -// of conditions and the following disclaimer. -// o Redistributions in binary form must reproduce the above copyright notice, this -// list of conditions and the following disclaimer in the documentation and/or -// other materials provided with the distribution. -// o Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long DMA0_IRQHandler - .long DMA1_IRQHandler - .long DMA2_IRQHandler - .long DMA3_IRQHandler - .long DMA4_IRQHandler - .long DMA5_IRQHandler - .long DMA6_IRQHandler - .long DMA7_IRQHandler - .long DMA8_IRQHandler - .long DMA9_IRQHandler - .long DMA10_IRQHandler - .long DMA11_IRQHandler - .long DMA12_IRQHandler - .long DMA13_IRQHandler - .long DMA14_IRQHandler - .long DMA15_IRQHandler - .long DMA_Error_IRQHandler - .long MCM_IRQHandler - .long FTF_IRQHandler - .long Read_Collision_IRQHandler - .long LVD_LVW_IRQHandler - .long LLWU_IRQHandler - .long WDOG_EWM_IRQHandler - .long RNG_IRQHandler - .long I2C0_IRQHandler - .long I2C1_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long I2S0_Tx_IRQHandler - .long I2S0_Rx_IRQHandler - .long LPUART0_IRQHandler - .long UART0_RX_TX_IRQHandler - .long UART0_ERR_IRQHandler - .long UART1_RX_TX_IRQHandler - .long UART1_ERR_IRQHandler - .long UART2_RX_TX_IRQHandler - .long UART2_ERR_IRQHandler - .long 0 - .long 0 - .long ADC0_IRQHandler - .long CMP0_IRQHandler - .long CMP1_IRQHandler - .long FTM0_IRQHandler - .long FTM1_IRQHandler - .long FTM2_IRQHandler - .long 0 - .long RTC_IRQHandler - .long RTC_Seconds_IRQHandler - .long PIT0_IRQHandler - .long PIT1_IRQHandler - .long PIT2_IRQHandler - .long PIT3_IRQHandler - .long PDB0_IRQHandler - .long USB0_IRQHandler - .long 0 - .long 0 - .long DAC0_IRQHandler - .long 0 - .long LPTMR0_IRQHandler - .long PORTA_IRQHandler - .long PORTB_IRQHandler - .long PORTC_IRQHandler - .long PORTD_IRQHandler - .long PORTE_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long FTM3_IRQHandler - .long DAC1_IRQHandler - .long ADC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ DMA0_IRQHandler - IRQ DMA1_IRQHandler - IRQ DMA2_IRQHandler - IRQ DMA3_IRQHandler - IRQ DMA4_IRQHandler - IRQ DMA5_IRQHandler - IRQ DMA6_IRQHandler - IRQ DMA7_IRQHandler - IRQ DMA8_IRQHandler - IRQ DMA9_IRQHandler - IRQ DMA10_IRQHandler - IRQ DMA11_IRQHandler - IRQ DMA12_IRQHandler - IRQ DMA13_IRQHandler - IRQ DMA14_IRQHandler - IRQ DMA15_IRQHandler - IRQ DMA_Error_IRQHandler - IRQ MCM_IRQHandler - IRQ FTF_IRQHandler - IRQ Read_Collision_IRQHandler - IRQ LVD_LVW_IRQHandler - IRQ LLWU_IRQHandler - IRQ WDOG_EWM_IRQHandler - IRQ RNG_IRQHandler - IRQ I2C0_IRQHandler - IRQ I2C1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ I2S0_Tx_IRQHandler - IRQ I2S0_Rx_IRQHandler - IRQ LPUART0_IRQHandler - IRQ UART0_RX_TX_IRQHandler - IRQ UART0_ERR_IRQHandler - IRQ UART1_RX_TX_IRQHandler - IRQ UART1_ERR_IRQHandler - IRQ UART2_RX_TX_IRQHandler - IRQ UART2_ERR_IRQHandler - IRQ ADC0_IRQHandler - IRQ CMP0_IRQHandler - IRQ CMP1_IRQHandler - IRQ FTM0_IRQHandler - IRQ FTM1_IRQHandler - IRQ FTM2_IRQHandler - IRQ RTC_IRQHandler - IRQ RTC_Seconds_IRQHandler - IRQ PIT0_IRQHandler - IRQ PIT1_IRQHandler - IRQ PIT2_IRQHandler - IRQ PIT3_IRQHandler - IRQ PDB0_IRQHandler - IRQ USB0_IRQHandler - IRQ DAC0_IRQHandler - IRQ LPTMR0_IRQHandler - IRQ PORTA_IRQHandler - IRQ PORTB_IRQHandler - IRQ PORTC_IRQHandler - IRQ PORTD_IRQHandler - IRQ PORTE_IRQHandler - IRQ FTM3_IRQHandler - IRQ DAC1_IRQHandler - IRQ ADC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/mk64f12.go b/device/nxp/mk64f12.go index c51f107..8c273cf 100644 --- a/device/nxp/mk64f12.go +++ b/device/nxp/mk64f12.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -280,8 +280,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export DMA0_IRQHandler func interruptDMA0() { diff --git a/device/nxp/mk64f12.s b/device/nxp/mk64f12.s deleted file mode 100644 index c5822ce..0000000 --- a/device/nxp/mk64f12.s +++ /dev/null @@ -1,236 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from MK64F12.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// MK64F12 NXP Microcontroller -*/ - -// Copyright 2016-2018 NXP SPDX-License-Identifier: BSD-3-Clause - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long DMA0_IRQHandler - .long DMA1_IRQHandler - .long DMA2_IRQHandler - .long DMA3_IRQHandler - .long DMA4_IRQHandler - .long DMA5_IRQHandler - .long DMA6_IRQHandler - .long DMA7_IRQHandler - .long DMA8_IRQHandler - .long DMA9_IRQHandler - .long DMA10_IRQHandler - .long DMA11_IRQHandler - .long DMA12_IRQHandler - .long DMA13_IRQHandler - .long DMA14_IRQHandler - .long DMA15_IRQHandler - .long DMA_Error_IRQHandler - .long MCM_IRQHandler - .long FTFE_IRQHandler - .long Read_Collision_IRQHandler - .long LVD_LVW_IRQHandler - .long LLWU_IRQHandler - .long WDOG_EWM_IRQHandler - .long RNG_IRQHandler - .long I2C0_IRQHandler - .long I2C1_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long I2S0_Tx_IRQHandler - .long I2S0_Rx_IRQHandler - .long UART0_LON_IRQHandler - .long UART0_RX_TX_IRQHandler - .long UART0_ERR_IRQHandler - .long UART1_RX_TX_IRQHandler - .long UART1_ERR_IRQHandler - .long UART2_RX_TX_IRQHandler - .long UART2_ERR_IRQHandler - .long UART3_RX_TX_IRQHandler - .long UART3_ERR_IRQHandler - .long ADC0_IRQHandler - .long CMP0_IRQHandler - .long CMP1_IRQHandler - .long FTM0_IRQHandler - .long FTM1_IRQHandler - .long FTM2_IRQHandler - .long CMT_IRQHandler - .long RTC_IRQHandler - .long RTC_Seconds_IRQHandler - .long PIT0_IRQHandler - .long PIT1_IRQHandler - .long PIT2_IRQHandler - .long PIT3_IRQHandler - .long PDB0_IRQHandler - .long USB0_IRQHandler - .long USBDCD_IRQHandler - .long 0 - .long DAC0_IRQHandler - .long 0 - .long LPTMR0_IRQHandler - .long PORTA_IRQHandler - .long PORTB_IRQHandler - .long PORTC_IRQHandler - .long PORTD_IRQHandler - .long PORTE_IRQHandler - .long 0 - .long SPI2_IRQHandler - .long UART4_RX_TX_IRQHandler - .long UART4_ERR_IRQHandler - .long UART5_RX_TX_IRQHandler - .long UART5_ERR_IRQHandler - .long CMP2_IRQHandler - .long FTM3_IRQHandler - .long DAC1_IRQHandler - .long ADC1_IRQHandler - .long I2C2_IRQHandler - .long CAN0_ORed_Message_buffer_IRQHandler - .long CAN0_Bus_Off_IRQHandler - .long CAN0_Error_IRQHandler - .long CAN0_Tx_Warning_IRQHandler - .long CAN0_Rx_Warning_IRQHandler - .long CAN0_Wake_Up_IRQHandler - .long SDHC_IRQHandler - .long ENET_1588_Timer_IRQHandler - .long ENET_Transmit_IRQHandler - .long ENET_Receive_IRQHandler - .long ENET_Error_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ DMA0_IRQHandler - IRQ DMA1_IRQHandler - IRQ DMA2_IRQHandler - IRQ DMA3_IRQHandler - IRQ DMA4_IRQHandler - IRQ DMA5_IRQHandler - IRQ DMA6_IRQHandler - IRQ DMA7_IRQHandler - IRQ DMA8_IRQHandler - IRQ DMA9_IRQHandler - IRQ DMA10_IRQHandler - IRQ DMA11_IRQHandler - IRQ DMA12_IRQHandler - IRQ DMA13_IRQHandler - IRQ DMA14_IRQHandler - IRQ DMA15_IRQHandler - IRQ DMA_Error_IRQHandler - IRQ MCM_IRQHandler - IRQ FTFE_IRQHandler - IRQ Read_Collision_IRQHandler - IRQ LVD_LVW_IRQHandler - IRQ LLWU_IRQHandler - IRQ WDOG_EWM_IRQHandler - IRQ RNG_IRQHandler - IRQ I2C0_IRQHandler - IRQ I2C1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ I2S0_Tx_IRQHandler - IRQ I2S0_Rx_IRQHandler - IRQ UART0_LON_IRQHandler - IRQ UART0_RX_TX_IRQHandler - IRQ UART0_ERR_IRQHandler - IRQ UART1_RX_TX_IRQHandler - IRQ UART1_ERR_IRQHandler - IRQ UART2_RX_TX_IRQHandler - IRQ UART2_ERR_IRQHandler - IRQ UART3_RX_TX_IRQHandler - IRQ UART3_ERR_IRQHandler - IRQ ADC0_IRQHandler - IRQ CMP0_IRQHandler - IRQ CMP1_IRQHandler - IRQ FTM0_IRQHandler - IRQ FTM1_IRQHandler - IRQ FTM2_IRQHandler - IRQ CMT_IRQHandler - IRQ RTC_IRQHandler - IRQ RTC_Seconds_IRQHandler - IRQ PIT0_IRQHandler - IRQ PIT1_IRQHandler - IRQ PIT2_IRQHandler - IRQ PIT3_IRQHandler - IRQ PDB0_IRQHandler - IRQ USB0_IRQHandler - IRQ USBDCD_IRQHandler - IRQ DAC0_IRQHandler - IRQ LPTMR0_IRQHandler - IRQ PORTA_IRQHandler - IRQ PORTB_IRQHandler - IRQ PORTC_IRQHandler - IRQ PORTD_IRQHandler - IRQ PORTE_IRQHandler - IRQ SPI2_IRQHandler - IRQ UART4_RX_TX_IRQHandler - IRQ UART4_ERR_IRQHandler - IRQ UART5_RX_TX_IRQHandler - IRQ UART5_ERR_IRQHandler - IRQ CMP2_IRQHandler - IRQ FTM3_IRQHandler - IRQ DAC1_IRQHandler - IRQ ADC1_IRQHandler - IRQ I2C2_IRQHandler - IRQ CAN0_ORed_Message_buffer_IRQHandler - IRQ CAN0_Bus_Off_IRQHandler - IRQ CAN0_Error_IRQHandler - IRQ CAN0_Tx_Warning_IRQHandler - IRQ CAN0_Rx_Warning_IRQHandler - IRQ CAN0_Wake_Up_IRQHandler - IRQ SDHC_IRQHandler - IRQ ENET_1588_Timer_IRQHandler - IRQ ENET_Transmit_IRQHandler - IRQ ENET_Receive_IRQHandler - IRQ ENET_Error_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/mk65f18.go b/device/nxp/mk65f18.go index 30bd223..3e4132f 100644 --- a/device/nxp/mk65f18.go +++ b/device/nxp/mk65f18.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -313,8 +313,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export DMA0_DMA16_IRQHandler func interruptDMA0_DMA16() { diff --git a/device/nxp/mk65f18.s b/device/nxp/mk65f18.s deleted file mode 100644 index 07b6f82..0000000 --- a/device/nxp/mk65f18.s +++ /dev/null @@ -1,261 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from MK65F18.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// MK65F18 NXP Microcontroller -*/ - -// Copyright 2016-2018 NXP SPDX-License-Identifier: BSD-3-Clause - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long DMA0_DMA16_IRQHandler - .long DMA1_DMA17_IRQHandler - .long DMA2_DMA18_IRQHandler - .long DMA3_DMA19_IRQHandler - .long DMA4_DMA20_IRQHandler - .long DMA5_DMA21_IRQHandler - .long DMA6_DMA22_IRQHandler - .long DMA7_DMA23_IRQHandler - .long DMA8_DMA24_IRQHandler - .long DMA9_DMA25_IRQHandler - .long DMA10_DMA26_IRQHandler - .long DMA11_DMA27_IRQHandler - .long DMA12_DMA28_IRQHandler - .long DMA13_DMA29_IRQHandler - .long DMA14_DMA30_IRQHandler - .long DMA15_DMA31_IRQHandler - .long DMA_Error_IRQHandler - .long MCM_IRQHandler - .long FTFE_IRQHandler - .long Read_Collision_IRQHandler - .long LVD_LVW_IRQHandler - .long LLWU_IRQHandler - .long WDOG_EWM_IRQHandler - .long RNG_IRQHandler - .long I2C0_IRQHandler - .long I2C1_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long I2S0_Tx_IRQHandler - .long I2S0_Rx_IRQHandler - .long 0 - .long UART0_RX_TX_IRQHandler - .long UART0_ERR_IRQHandler - .long UART1_RX_TX_IRQHandler - .long UART1_ERR_IRQHandler - .long UART2_RX_TX_IRQHandler - .long UART2_ERR_IRQHandler - .long UART3_RX_TX_IRQHandler - .long UART3_ERR_IRQHandler - .long ADC0_IRQHandler - .long CMP0_IRQHandler - .long CMP1_IRQHandler - .long FTM0_IRQHandler - .long FTM1_IRQHandler - .long FTM2_IRQHandler - .long CMT_IRQHandler - .long RTC_IRQHandler - .long RTC_Seconds_IRQHandler - .long PIT0_IRQHandler - .long PIT1_IRQHandler - .long PIT2_IRQHandler - .long PIT3_IRQHandler - .long PDB0_IRQHandler - .long USB0_IRQHandler - .long USBDCD_IRQHandler - .long 0 - .long DAC0_IRQHandler - .long 0 - .long LPTMR0_IRQHandler - .long PORTA_IRQHandler - .long PORTB_IRQHandler - .long PORTC_IRQHandler - .long PORTD_IRQHandler - .long PORTE_IRQHandler - .long 0 - .long SPI2_IRQHandler - .long UART4_RX_TX_IRQHandler - .long UART4_ERR_IRQHandler - .long 0 - .long 0 - .long CMP2_IRQHandler - .long FTM3_IRQHandler - .long DAC1_IRQHandler - .long ADC1_IRQHandler - .long I2C2_IRQHandler - .long CAN0_ORed_Message_buffer_IRQHandler - .long CAN0_Bus_Off_IRQHandler - .long CAN0_Error_IRQHandler - .long CAN0_Tx_Warning_IRQHandler - .long CAN0_Rx_Warning_IRQHandler - .long CAN0_Wake_Up_IRQHandler - .long SDHC_IRQHandler - .long ENET_1588_Timer_IRQHandler - .long ENET_Transmit_IRQHandler - .long ENET_Receive_IRQHandler - .long ENET_Error_IRQHandler - .long LPUART0_IRQHandler - .long TSI0_IRQHandler - .long TPM1_IRQHandler - .long TPM2_IRQHandler - .long USBHSDCD_IRQHandler - .long I2C3_IRQHandler - .long CMP3_IRQHandler - .long USBHS_IRQHandler - .long CAN1_ORed_Message_buffer_IRQHandler - .long CAN1_Bus_Off_IRQHandler - .long CAN1_Error_IRQHandler - .long CAN1_Tx_Warning_IRQHandler - .long CAN1_Rx_Warning_IRQHandler - .long CAN1_Wake_Up_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ DMA0_DMA16_IRQHandler - IRQ DMA1_DMA17_IRQHandler - IRQ DMA2_DMA18_IRQHandler - IRQ DMA3_DMA19_IRQHandler - IRQ DMA4_DMA20_IRQHandler - IRQ DMA5_DMA21_IRQHandler - IRQ DMA6_DMA22_IRQHandler - IRQ DMA7_DMA23_IRQHandler - IRQ DMA8_DMA24_IRQHandler - IRQ DMA9_DMA25_IRQHandler - IRQ DMA10_DMA26_IRQHandler - IRQ DMA11_DMA27_IRQHandler - IRQ DMA12_DMA28_IRQHandler - IRQ DMA13_DMA29_IRQHandler - IRQ DMA14_DMA30_IRQHandler - IRQ DMA15_DMA31_IRQHandler - IRQ DMA_Error_IRQHandler - IRQ MCM_IRQHandler - IRQ FTFE_IRQHandler - IRQ Read_Collision_IRQHandler - IRQ LVD_LVW_IRQHandler - IRQ LLWU_IRQHandler - IRQ WDOG_EWM_IRQHandler - IRQ RNG_IRQHandler - IRQ I2C0_IRQHandler - IRQ I2C1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ I2S0_Tx_IRQHandler - IRQ I2S0_Rx_IRQHandler - IRQ UART0_RX_TX_IRQHandler - IRQ UART0_ERR_IRQHandler - IRQ UART1_RX_TX_IRQHandler - IRQ UART1_ERR_IRQHandler - IRQ UART2_RX_TX_IRQHandler - IRQ UART2_ERR_IRQHandler - IRQ UART3_RX_TX_IRQHandler - IRQ UART3_ERR_IRQHandler - IRQ ADC0_IRQHandler - IRQ CMP0_IRQHandler - IRQ CMP1_IRQHandler - IRQ FTM0_IRQHandler - IRQ FTM1_IRQHandler - IRQ FTM2_IRQHandler - IRQ CMT_IRQHandler - IRQ RTC_IRQHandler - IRQ RTC_Seconds_IRQHandler - IRQ PIT0_IRQHandler - IRQ PIT1_IRQHandler - IRQ PIT2_IRQHandler - IRQ PIT3_IRQHandler - IRQ PDB0_IRQHandler - IRQ USB0_IRQHandler - IRQ USBDCD_IRQHandler - IRQ DAC0_IRQHandler - IRQ LPTMR0_IRQHandler - IRQ PORTA_IRQHandler - IRQ PORTB_IRQHandler - IRQ PORTC_IRQHandler - IRQ PORTD_IRQHandler - IRQ PORTE_IRQHandler - IRQ SPI2_IRQHandler - IRQ UART4_RX_TX_IRQHandler - IRQ UART4_ERR_IRQHandler - IRQ CMP2_IRQHandler - IRQ FTM3_IRQHandler - IRQ DAC1_IRQHandler - IRQ ADC1_IRQHandler - IRQ I2C2_IRQHandler - IRQ CAN0_ORed_Message_buffer_IRQHandler - IRQ CAN0_Bus_Off_IRQHandler - IRQ CAN0_Error_IRQHandler - IRQ CAN0_Tx_Warning_IRQHandler - IRQ CAN0_Rx_Warning_IRQHandler - IRQ CAN0_Wake_Up_IRQHandler - IRQ SDHC_IRQHandler - IRQ ENET_1588_Timer_IRQHandler - IRQ ENET_Transmit_IRQHandler - IRQ ENET_Receive_IRQHandler - IRQ ENET_Error_IRQHandler - IRQ LPUART0_IRQHandler - IRQ TSI0_IRQHandler - IRQ TPM1_IRQHandler - IRQ TPM2_IRQHandler - IRQ USBHSDCD_IRQHandler - IRQ I2C3_IRQHandler - IRQ CMP3_IRQHandler - IRQ USBHS_IRQHandler - IRQ CAN1_ORed_Message_buffer_IRQHandler - IRQ CAN1_Bus_Off_IRQHandler - IRQ CAN1_Error_IRQHandler - IRQ CAN1_Tx_Warning_IRQHandler - IRQ CAN1_Rx_Warning_IRQHandler - IRQ CAN1_Wake_Up_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/mk66f18.go b/device/nxp/mk66f18.go index cf68a4d..ee25ba7 100644 --- a/device/nxp/mk66f18.go +++ b/device/nxp/mk66f18.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -313,8 +313,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export DMA0_DMA16_IRQHandler func interruptDMA0_DMA16() { diff --git a/device/nxp/mk66f18.s b/device/nxp/mk66f18.s deleted file mode 100644 index 4f5fa90..0000000 --- a/device/nxp/mk66f18.s +++ /dev/null @@ -1,261 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from MK66F18.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// MK66F18 NXP Microcontroller -*/ - -// Copyright 2016-2018 NXP SPDX-License-Identifier: BSD-3-Clause - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long DMA0_DMA16_IRQHandler - .long DMA1_DMA17_IRQHandler - .long DMA2_DMA18_IRQHandler - .long DMA3_DMA19_IRQHandler - .long DMA4_DMA20_IRQHandler - .long DMA5_DMA21_IRQHandler - .long DMA6_DMA22_IRQHandler - .long DMA7_DMA23_IRQHandler - .long DMA8_DMA24_IRQHandler - .long DMA9_DMA25_IRQHandler - .long DMA10_DMA26_IRQHandler - .long DMA11_DMA27_IRQHandler - .long DMA12_DMA28_IRQHandler - .long DMA13_DMA29_IRQHandler - .long DMA14_DMA30_IRQHandler - .long DMA15_DMA31_IRQHandler - .long DMA_Error_IRQHandler - .long MCM_IRQHandler - .long FTFE_IRQHandler - .long Read_Collision_IRQHandler - .long LVD_LVW_IRQHandler - .long LLWU_IRQHandler - .long WDOG_EWM_IRQHandler - .long RNG_IRQHandler - .long I2C0_IRQHandler - .long I2C1_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long I2S0_Tx_IRQHandler - .long I2S0_Rx_IRQHandler - .long 0 - .long UART0_RX_TX_IRQHandler - .long UART0_ERR_IRQHandler - .long UART1_RX_TX_IRQHandler - .long UART1_ERR_IRQHandler - .long UART2_RX_TX_IRQHandler - .long UART2_ERR_IRQHandler - .long UART3_RX_TX_IRQHandler - .long UART3_ERR_IRQHandler - .long ADC0_IRQHandler - .long CMP0_IRQHandler - .long CMP1_IRQHandler - .long FTM0_IRQHandler - .long FTM1_IRQHandler - .long FTM2_IRQHandler - .long CMT_IRQHandler - .long RTC_IRQHandler - .long RTC_Seconds_IRQHandler - .long PIT0_IRQHandler - .long PIT1_IRQHandler - .long PIT2_IRQHandler - .long PIT3_IRQHandler - .long PDB0_IRQHandler - .long USB0_IRQHandler - .long USBDCD_IRQHandler - .long 0 - .long DAC0_IRQHandler - .long 0 - .long LPTMR0_IRQHandler - .long PORTA_IRQHandler - .long PORTB_IRQHandler - .long PORTC_IRQHandler - .long PORTD_IRQHandler - .long PORTE_IRQHandler - .long 0 - .long SPI2_IRQHandler - .long UART4_RX_TX_IRQHandler - .long UART4_ERR_IRQHandler - .long 0 - .long 0 - .long CMP2_IRQHandler - .long FTM3_IRQHandler - .long DAC1_IRQHandler - .long ADC1_IRQHandler - .long I2C2_IRQHandler - .long CAN0_ORed_Message_buffer_IRQHandler - .long CAN0_Bus_Off_IRQHandler - .long CAN0_Error_IRQHandler - .long CAN0_Tx_Warning_IRQHandler - .long CAN0_Rx_Warning_IRQHandler - .long CAN0_Wake_Up_IRQHandler - .long SDHC_IRQHandler - .long ENET_1588_Timer_IRQHandler - .long ENET_Transmit_IRQHandler - .long ENET_Receive_IRQHandler - .long ENET_Error_IRQHandler - .long LPUART0_IRQHandler - .long TSI0_IRQHandler - .long TPM1_IRQHandler - .long TPM2_IRQHandler - .long USBHSDCD_IRQHandler - .long I2C3_IRQHandler - .long CMP3_IRQHandler - .long USBHS_IRQHandler - .long CAN1_ORed_Message_buffer_IRQHandler - .long CAN1_Bus_Off_IRQHandler - .long CAN1_Error_IRQHandler - .long CAN1_Tx_Warning_IRQHandler - .long CAN1_Rx_Warning_IRQHandler - .long CAN1_Wake_Up_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ DMA0_DMA16_IRQHandler - IRQ DMA1_DMA17_IRQHandler - IRQ DMA2_DMA18_IRQHandler - IRQ DMA3_DMA19_IRQHandler - IRQ DMA4_DMA20_IRQHandler - IRQ DMA5_DMA21_IRQHandler - IRQ DMA6_DMA22_IRQHandler - IRQ DMA7_DMA23_IRQHandler - IRQ DMA8_DMA24_IRQHandler - IRQ DMA9_DMA25_IRQHandler - IRQ DMA10_DMA26_IRQHandler - IRQ DMA11_DMA27_IRQHandler - IRQ DMA12_DMA28_IRQHandler - IRQ DMA13_DMA29_IRQHandler - IRQ DMA14_DMA30_IRQHandler - IRQ DMA15_DMA31_IRQHandler - IRQ DMA_Error_IRQHandler - IRQ MCM_IRQHandler - IRQ FTFE_IRQHandler - IRQ Read_Collision_IRQHandler - IRQ LVD_LVW_IRQHandler - IRQ LLWU_IRQHandler - IRQ WDOG_EWM_IRQHandler - IRQ RNG_IRQHandler - IRQ I2C0_IRQHandler - IRQ I2C1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ I2S0_Tx_IRQHandler - IRQ I2S0_Rx_IRQHandler - IRQ UART0_RX_TX_IRQHandler - IRQ UART0_ERR_IRQHandler - IRQ UART1_RX_TX_IRQHandler - IRQ UART1_ERR_IRQHandler - IRQ UART2_RX_TX_IRQHandler - IRQ UART2_ERR_IRQHandler - IRQ UART3_RX_TX_IRQHandler - IRQ UART3_ERR_IRQHandler - IRQ ADC0_IRQHandler - IRQ CMP0_IRQHandler - IRQ CMP1_IRQHandler - IRQ FTM0_IRQHandler - IRQ FTM1_IRQHandler - IRQ FTM2_IRQHandler - IRQ CMT_IRQHandler - IRQ RTC_IRQHandler - IRQ RTC_Seconds_IRQHandler - IRQ PIT0_IRQHandler - IRQ PIT1_IRQHandler - IRQ PIT2_IRQHandler - IRQ PIT3_IRQHandler - IRQ PDB0_IRQHandler - IRQ USB0_IRQHandler - IRQ USBDCD_IRQHandler - IRQ DAC0_IRQHandler - IRQ LPTMR0_IRQHandler - IRQ PORTA_IRQHandler - IRQ PORTB_IRQHandler - IRQ PORTC_IRQHandler - IRQ PORTD_IRQHandler - IRQ PORTE_IRQHandler - IRQ SPI2_IRQHandler - IRQ UART4_RX_TX_IRQHandler - IRQ UART4_ERR_IRQHandler - IRQ CMP2_IRQHandler - IRQ FTM3_IRQHandler - IRQ DAC1_IRQHandler - IRQ ADC1_IRQHandler - IRQ I2C2_IRQHandler - IRQ CAN0_ORed_Message_buffer_IRQHandler - IRQ CAN0_Bus_Off_IRQHandler - IRQ CAN0_Error_IRQHandler - IRQ CAN0_Tx_Warning_IRQHandler - IRQ CAN0_Rx_Warning_IRQHandler - IRQ CAN0_Wake_Up_IRQHandler - IRQ SDHC_IRQHandler - IRQ ENET_1588_Timer_IRQHandler - IRQ ENET_Transmit_IRQHandler - IRQ ENET_Receive_IRQHandler - IRQ ENET_Error_IRQHandler - IRQ LPUART0_IRQHandler - IRQ TSI0_IRQHandler - IRQ TPM1_IRQHandler - IRQ TPM2_IRQHandler - IRQ USBHSDCD_IRQHandler - IRQ I2C3_IRQHandler - IRQ CMP3_IRQHandler - IRQ USBHS_IRQHandler - IRQ CAN1_ORed_Message_buffer_IRQHandler - IRQ CAN1_Bus_Off_IRQHandler - IRQ CAN1_Error_IRQHandler - IRQ CAN1_Tx_Warning_IRQHandler - IRQ CAN1_Rx_Warning_IRQHandler - IRQ CAN1_Wake_Up_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/mkl26z4.go b/device/nxp/mkl26z4.go index 9d91785..b23e2da 100644 --- a/device/nxp/mkl26z4.go +++ b/device/nxp/mkl26z4.go @@ -28,7 +28,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -139,8 +139,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export DMA0_IRQHandler func interruptDMA0() { diff --git a/device/nxp/mkl26z4.s b/device/nxp/mkl26z4.s deleted file mode 100644 index 86e2912..0000000 --- a/device/nxp/mkl26z4.s +++ /dev/null @@ -1,147 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from MKL26Z4.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// MKL26Z4 NXP Microcontroller -*/ - -// Redistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met: -// o Redistributions of source code must retain the above copyright notice, this list -// of conditions and the following disclaimer. -// o Redistributions in binary form must reproduce the above copyright notice, this -// list of conditions and the following disclaimer in the documentation and/or -// other materials provided with the distribution. -// o Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long DMA0_IRQHandler - .long DMA1_IRQHandler - .long DMA2_IRQHandler - .long DMA3_IRQHandler - .long 0 - .long FTFA_IRQHandler - .long LVD_LVW_IRQHandler - .long LLWU_IRQHandler - .long I2C0_IRQHandler - .long I2C1_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long UART2_IRQHandler - .long ADC0_IRQHandler - .long CMP0_IRQHandler - .long TPM0_IRQHandler - .long TPM1_IRQHandler - .long TPM2_IRQHandler - .long RTC_IRQHandler - .long RTC_Seconds_IRQHandler - .long PIT_IRQHandler - .long I2S0_IRQHandler - .long USB0_IRQHandler - .long DAC0_IRQHandler - .long TSI0_IRQHandler - .long MCG_IRQHandler - .long LPTMR0_IRQHandler - .long 0 - .long PORTA_IRQHandler - .long PORTC_PORTD_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ DMA0_IRQHandler - IRQ DMA1_IRQHandler - IRQ DMA2_IRQHandler - IRQ DMA3_IRQHandler - IRQ FTFA_IRQHandler - IRQ LVD_LVW_IRQHandler - IRQ LLWU_IRQHandler - IRQ I2C0_IRQHandler - IRQ I2C1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ UART2_IRQHandler - IRQ ADC0_IRQHandler - IRQ CMP0_IRQHandler - IRQ TPM0_IRQHandler - IRQ TPM1_IRQHandler - IRQ TPM2_IRQHandler - IRQ RTC_IRQHandler - IRQ RTC_Seconds_IRQHandler - IRQ PIT_IRQHandler - IRQ I2S0_IRQHandler - IRQ USB0_IRQHandler - IRQ DAC0_IRQHandler - IRQ TSI0_IRQHandler - IRQ MCG_IRQHandler - IRQ LPTMR0_IRQHandler - IRQ PORTA_IRQHandler - IRQ PORTC_PORTD_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/mkw41z4.go b/device/nxp/mkw41z4.go index f3bd032..0b561d6 100644 --- a/device/nxp/mkw41z4.go +++ b/device/nxp/mkw41z4.go @@ -28,7 +28,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -136,8 +136,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export DMA0_IRQHandler func interruptDMA0() { diff --git a/device/nxp/mkw41z4.s b/device/nxp/mkw41z4.s deleted file mode 100644 index b14a74c..0000000 --- a/device/nxp/mkw41z4.s +++ /dev/null @@ -1,146 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from MKW41Z4.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// MKW41Z4 NXP Microcontroller -*/ - -// Redistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met: -// o Redistributions of source code must retain the above copyright notice, this list -// of conditions and the following disclaimer. -// o Redistributions in binary form must reproduce the above copyright notice, this -// list of conditions and the following disclaimer in the documentation and/or -// other materials provided with the distribution. -// o Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long DMA0_IRQHandler - .long DMA1_IRQHandler - .long DMA2_IRQHandler - .long DMA3_IRQHandler - .long 0 - .long FTFA_IRQHandler - .long LVD_LVW_DCDC_IRQHandler - .long LLWU_IRQHandler - .long I2C0_IRQHandler - .long I2C1_IRQHandler - .long SPI0_IRQHandler - .long TSI0_IRQHandler - .long LPUART0_IRQHandler - .long TRNG0_IRQHandler - .long CMT_IRQHandler - .long ADC0_IRQHandler - .long CMP0_IRQHandler - .long TPM0_IRQHandler - .long TPM1_IRQHandler - .long TPM2_IRQHandler - .long RTC_IRQHandler - .long RTC_Seconds_IRQHandler - .long PIT_IRQHandler - .long LTC0_IRQHandler - .long 0 - .long DAC0_IRQHandler - .long 0 - .long MCG_IRQHandler - .long LPTMR0_IRQHandler - .long SPI1_IRQHandler - .long PORTA_IRQHandler - .long PORTB_PORTC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ DMA0_IRQHandler - IRQ DMA1_IRQHandler - IRQ DMA2_IRQHandler - IRQ DMA3_IRQHandler - IRQ FTFA_IRQHandler - IRQ LVD_LVW_DCDC_IRQHandler - IRQ LLWU_IRQHandler - IRQ I2C0_IRQHandler - IRQ I2C1_IRQHandler - IRQ SPI0_IRQHandler - IRQ TSI0_IRQHandler - IRQ LPUART0_IRQHandler - IRQ TRNG0_IRQHandler - IRQ CMT_IRQHandler - IRQ ADC0_IRQHandler - IRQ CMP0_IRQHandler - IRQ TPM0_IRQHandler - IRQ TPM1_IRQHandler - IRQ TPM2_IRQHandler - IRQ RTC_IRQHandler - IRQ RTC_Seconds_IRQHandler - IRQ PIT_IRQHandler - IRQ LTC0_IRQHandler - IRQ DAC0_IRQHandler - IRQ MCG_IRQHandler - IRQ LPTMR0_IRQHandler - IRQ SPI1_IRQHandler - IRQ PORTA_IRQHandler - IRQ PORTB_PORTC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/neom3.go b/device/nxp/neom3.go index 8c1b013..c4a404e 100644 --- a/device/nxp/neom3.go +++ b/device/nxp/neom3.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -133,8 +133,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDT_IRQHandler func interruptWWDT() { diff --git a/device/nxp/neom3.s b/device/nxp/neom3.s deleted file mode 100644 index bf363a6..0000000 --- a/device/nxp/neom3.s +++ /dev/null @@ -1,145 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from LPC178x_7x_v0.8.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// Neo M3 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDT_IRQHandler - .long TIMER0_IRQHandler - .long TIMER1_IRQHandler - .long TIMER2_IRQHandler - .long TIMER3_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long PWM1_IRQHandler - .long I2C0_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long 0 - .long SSP0_IRQHandler - .long SSP1_IRQHandler - .long 0 - .long RTC_IRQHandler - .long EINT0_IRQHandler - .long EINT1_IRQHandler - .long EINT2_IRQHandler - .long EINT3_IRQHandler - .long ADC_IRQHandler - .long BOD_IRQHandler - .long USB_IRQHandler - .long CAN_IRQHandler - .long GPDMA_IRQHandler - .long I2S_IRQHandler - .long ETHERNET_IRQHandler - .long SDMMC_IRQHandler - .long MCPWM_IRQHandler - .long QEI_IRQHandler - .long 0 - .long USB_NEED_CLK_IRQHandler - .long 0 - .long UART4_IRQHandler - .long SSP2_IRQHandler - .long LCD_IRQHandler - .long GPIOINT_IRQHandler - .long PWM0_IRQHandler - .long EEPROM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDT_IRQHandler - IRQ TIMER0_IRQHandler - IRQ TIMER1_IRQHandler - IRQ TIMER2_IRQHandler - IRQ TIMER3_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ PWM1_IRQHandler - IRQ I2C0_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SSP0_IRQHandler - IRQ SSP1_IRQHandler - IRQ RTC_IRQHandler - IRQ EINT0_IRQHandler - IRQ EINT1_IRQHandler - IRQ EINT2_IRQHandler - IRQ EINT3_IRQHandler - IRQ ADC_IRQHandler - IRQ BOD_IRQHandler - IRQ USB_IRQHandler - IRQ CAN_IRQHandler - IRQ GPDMA_IRQHandler - IRQ I2S_IRQHandler - IRQ ETHERNET_IRQHandler - IRQ SDMMC_IRQHandler - IRQ MCPWM_IRQHandler - IRQ QEI_IRQHandler - IRQ USB_NEED_CLK_IRQHandler - IRQ UART4_IRQHandler - IRQ SSP2_IRQHandler - IRQ LCD_IRQHandler - IRQ GPIOINT_IRQHandler - IRQ PWM0_IRQHandler - IRQ EEPROM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/nxp/qn908xc.go b/device/nxp/qn908xc.go index d821f99..78ae5a0 100644 --- a/device/nxp/qn908xc.go +++ b/device/nxp/qn908xc.go @@ -10,7 +10,7 @@ package nxp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -31,8 +31,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} // Peripherals. var ( diff --git a/device/nxp/qn908xc.s b/device/nxp/qn908xc.s deleted file mode 100644 index abcd706..0000000 --- a/device/nxp/qn908xc.s +++ /dev/null @@ -1,67 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from QN908XC.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/NXP - -/* -// QN9080C, QN9083C -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa2a1ab.go b/device/renesas/r7fa2a1ab.go index 71b8583..fb673c0 100644 --- a/device/renesas/r7fa2a1ab.go +++ b/device/renesas/r7fa2a1ab.go @@ -10,7 +10,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -127,8 +127,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa2a1ab.s b/device/renesas/r7fa2a1ab.s deleted file mode 100644 index b93cf1c..0000000 --- a/device/renesas/r7fa2a1ab.s +++ /dev/null @@ -1,131 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA2A1AB.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// ARM 32-bit Cortex-M23 Microcontroller based device, CPU clock up to 48MHz, etc. -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa2e1a9.go b/device/renesas/r7fa2e1a9.go index 5874b3c..173f7af 100644 --- a/device/renesas/r7fa2e1a9.go +++ b/device/renesas/r7fa2e1a9.go @@ -28,7 +28,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -145,8 +145,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa2e1a9.s b/device/renesas/r7fa2e1a9.s deleted file mode 100644 index 17262dc..0000000 --- a/device/renesas/r7fa2e1a9.s +++ /dev/null @@ -1,149 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA2E1A9.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm Cortex-M23 based Microcontroller RA2E1 device -*/ - -// This software is supplied by Renesas Electronics Corporation and is only intended for -// use with Renesas products. No other uses are authorized. This software is owned by -// Renesas Electronics Corporation and is protected under all applicable laws, including -// copyright laws. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -// THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -// ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED NOT -// PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED -// COMPANIES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -// DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -// -// Renesas reserves the right, without notice, to make changes to this software and to -// discontinue the availability of this software. By using this software, you agree to -// the additional terms and conditions found by accessing the following link: -// http://www.renesas.com/disclaimer -// \n - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa2e2a7.go b/device/renesas/r7fa2e2a7.go index b26e9d3..ec6e311 100644 --- a/device/renesas/r7fa2e2a7.go +++ b/device/renesas/r7fa2e2a7.go @@ -28,7 +28,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -145,8 +145,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa2e2a7.s b/device/renesas/r7fa2e2a7.s deleted file mode 100644 index c9bb243..0000000 --- a/device/renesas/r7fa2e2a7.s +++ /dev/null @@ -1,149 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA2E2A7.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm Cortex-M23 based Microcontroller RA2E2 device -*/ - -// This software is supplied by Renesas Electronics Corporation and is only intended for -// use with Renesas products. No other uses are authorized. This software is owned by -// Renesas Electronics Corporation and is protected under all applicable laws, including -// copyright laws. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -// THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -// ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED NOT -// PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED -// COMPANIES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -// DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -// -// Renesas reserves the right, without notice, to make changes to this software and to -// discontinue the availability of this software. By using this software, you agree to -// the additional terms and conditions found by accessing the following link: -// http://www.renesas.com/disclaimer -// \n - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa2l1ab.go b/device/renesas/r7fa2l1ab.go index b926c33..b6d0661 100644 --- a/device/renesas/r7fa2l1ab.go +++ b/device/renesas/r7fa2l1ab.go @@ -28,7 +28,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -145,8 +145,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa2l1ab.s b/device/renesas/r7fa2l1ab.s deleted file mode 100644 index 45e5a38..0000000 --- a/device/renesas/r7fa2l1ab.s +++ /dev/null @@ -1,149 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA2L1AB.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm Cortex-M23 based Microcontroller RA2L1 group -*/ - -// This software is supplied by Renesas Electronics Corporation and is only intended for -// use with Renesas products. No other uses are authorized. This software is owned by -// Renesas Electronics Corporation and is protected under all applicable laws, including -// copyright laws. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -// THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -// ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED NOT -// PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED -// COMPANIES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -// DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -// -// Renesas reserves the right, without notice, to make changes to this software and to -// discontinue the availability of this software. By using this software, you agree to -// the additional terms and conditions found by accessing the following link: -// http://www.renesas.com/disclaimer -// \n - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa4e10d.go b/device/renesas/r7fa4e10d.go index ed5f2b6..0a82342 100644 --- a/device/renesas/r7fa4e10d.go +++ b/device/renesas/r7fa4e10d.go @@ -28,7 +28,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -337,8 +337,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa4e10d.s b/device/renesas/r7fa4e10d.s deleted file mode 100644 index ce8ca70..0000000 --- a/device/renesas/r7fa4e10d.s +++ /dev/null @@ -1,277 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA4E10D.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm Cortex-M33 based Microcontroller RA4E1 group -*/ - -// This software is supplied by Renesas Electronics Corporation and is only intended for -// use with Renesas products. No other uses are authorized. This software is owned by -// Renesas Electronics Corporation and is protected under all applicable laws, including -// copyright laws. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -// THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -// ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED NOT -// PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED -// COMPANIES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -// DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -// -// Renesas reserves the right, without notice, to make changes to this software and to -// discontinue the availability of this software. By using this software, you agree to -// the additional terms and conditions found by accessing the following link: -// http://www.renesas.com/disclaimer -// \n - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa4e2b9.go b/device/renesas/r7fa4e2b9.go index dff4136..b7d7cb5 100644 --- a/device/renesas/r7fa4e2b9.go +++ b/device/renesas/r7fa4e2b9.go @@ -28,7 +28,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -337,8 +337,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa4e2b9.s b/device/renesas/r7fa4e2b9.s deleted file mode 100644 index 2dcb98e..0000000 --- a/device/renesas/r7fa4e2b9.s +++ /dev/null @@ -1,277 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA4E2B9.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm Cortex-M33 based Microcontroller RA4E2 group -*/ - -// This software is supplied by Renesas Electronics Corporation and is only intended for -// use with Renesas products. No other uses are authorized. This software is owned by -// Renesas Electronics Corporation and is protected under all applicable laws, including -// copyright laws. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -// THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -// ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED NOT -// PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED -// COMPANIES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -// DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -// -// Renesas reserves the right, without notice, to make changes to this software and to -// discontinue the availability of this software. By using this software, you agree to -// the additional terms and conditions found by accessing the following link: -// http://www.renesas.com/disclaimer -// \n - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa4m1ab.go b/device/renesas/r7fa4m1ab.go index 1f5656a..eb03632 100644 --- a/device/renesas/r7fa4m1ab.go +++ b/device/renesas/r7fa4m1ab.go @@ -10,7 +10,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -127,8 +127,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa4m1ab.s b/device/renesas/r7fa4m1ab.s deleted file mode 100644 index d079e6b..0000000 --- a/device/renesas/r7fa4m1ab.s +++ /dev/null @@ -1,131 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA4M1AB.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// ARM 32-bit Cortex-M4F Microcontroller based device, CPU clock up to 48MHz, etc. -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa4m2ad.go b/device/renesas/r7fa4m2ad.go index 0d9f18f..d04c338 100644 --- a/device/renesas/r7fa4m2ad.go +++ b/device/renesas/r7fa4m2ad.go @@ -28,7 +28,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -337,8 +337,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa4m2ad.s b/device/renesas/r7fa4m2ad.s deleted file mode 100644 index edae698..0000000 --- a/device/renesas/r7fa4m2ad.s +++ /dev/null @@ -1,277 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA4M2AD.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm Cortex-M33 based Microcontroller RA4M2 group -*/ - -// This software is supplied by Renesas Electronics Corporation and is only intended for -// use with Renesas products. No other uses are authorized. This software is owned by -// Renesas Electronics Corporation and is protected under all applicable laws, including -// copyright laws. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -// THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -// ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED NOT -// PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED -// COMPANIES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -// DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -// -// Renesas reserves the right, without notice, to make changes to this software and to -// discontinue the availability of this software. By using this software, you agree to -// the additional terms and conditions found by accessing the following link: -// http://www.renesas.com/disclaimer -// \n - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa4m3af.go b/device/renesas/r7fa4m3af.go index ea28386..571d0c5 100644 --- a/device/renesas/r7fa4m3af.go +++ b/device/renesas/r7fa4m3af.go @@ -28,7 +28,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -337,8 +337,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa4m3af.s b/device/renesas/r7fa4m3af.s deleted file mode 100644 index 26ec053..0000000 --- a/device/renesas/r7fa4m3af.s +++ /dev/null @@ -1,277 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA4M3AF.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm Cortex-M33 based Microcontroller RA4M3 group -*/ - -// This software is supplied by Renesas Electronics Corporation and is only intended for -// use with Renesas products. No other uses are authorized. This software is owned by -// Renesas Electronics Corporation and is protected under all applicable laws, including -// copyright laws. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -// THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -// ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED NOT -// PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED -// COMPANIES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -// DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -// -// Renesas reserves the right, without notice, to make changes to this software and to -// discontinue the availability of this software. By using this software, you agree to -// the additional terms and conditions found by accessing the following link: -// http://www.renesas.com/disclaimer -// \n - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa4t1bb.go b/device/renesas/r7fa4t1bb.go index 9b697e0..4c726d7 100644 --- a/device/renesas/r7fa4t1bb.go +++ b/device/renesas/r7fa4t1bb.go @@ -28,7 +28,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -337,8 +337,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa4t1bb.s b/device/renesas/r7fa4t1bb.s deleted file mode 100644 index 8828752..0000000 --- a/device/renesas/r7fa4t1bb.s +++ /dev/null @@ -1,277 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA4T1BB.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm Cortex-M33 based Microcontroller RA4T1 group -*/ - -// This software is supplied by Renesas Electronics Corporation and is only intended for -// use with Renesas products. No other uses are authorized. This software is owned by -// Renesas Electronics Corporation and is protected under all applicable laws, including -// copyright laws. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -// THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -// ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED NOT -// PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED -// COMPANIES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -// DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -// -// Renesas reserves the right, without notice, to make changes to this software and to -// discontinue the availability of this software. By using this software, you agree to -// the additional terms and conditions found by accessing the following link: -// http://www.renesas.com/disclaimer -// \n - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa4w1ad.go b/device/renesas/r7fa4w1ad.go index 1e19292..fe1cff0 100644 --- a/device/renesas/r7fa4w1ad.go +++ b/device/renesas/r7fa4w1ad.go @@ -10,7 +10,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -127,8 +127,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa4w1ad.s b/device/renesas/r7fa4w1ad.s deleted file mode 100644 index 3296386..0000000 --- a/device/renesas/r7fa4w1ad.s +++ /dev/null @@ -1,131 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA4W1AD.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// ARM 32-bit Cortex-M4F Microcontroller based device, CPU clock up to 48MHz, etc. -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa6e10f.go b/device/renesas/r7fa6e10f.go index 6186fda..bbcf0f2 100644 --- a/device/renesas/r7fa6e10f.go +++ b/device/renesas/r7fa6e10f.go @@ -28,7 +28,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -337,8 +337,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa6e10f.s b/device/renesas/r7fa6e10f.s deleted file mode 100644 index 82eab9e..0000000 --- a/device/renesas/r7fa6e10f.s +++ /dev/null @@ -1,277 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA6E10F.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm Cortex-M33 based Microcontroller RA6E1 group -*/ - -// This software is supplied by Renesas Electronics Corporation and is only intended for -// use with Renesas products. No other uses are authorized. This software is owned by -// Renesas Electronics Corporation and is protected under all applicable laws, including -// copyright laws. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -// THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -// ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED NOT -// PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED -// COMPANIES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -// DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -// -// Renesas reserves the right, without notice, to make changes to this software and to -// discontinue the availability of this software. By using this software, you agree to -// the additional terms and conditions found by accessing the following link: -// http://www.renesas.com/disclaimer -// \n - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa6e2bb.go b/device/renesas/r7fa6e2bb.go index a33e87d..4b22eb9 100644 --- a/device/renesas/r7fa6e2bb.go +++ b/device/renesas/r7fa6e2bb.go @@ -28,7 +28,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -337,8 +337,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa6e2bb.s b/device/renesas/r7fa6e2bb.s deleted file mode 100644 index c503796..0000000 --- a/device/renesas/r7fa6e2bb.s +++ /dev/null @@ -1,277 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA6E2BB.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm Cortex-M33 based Microcontroller RA6E2 group -*/ - -// This software is supplied by Renesas Electronics Corporation and is only intended for -// use with Renesas products. No other uses are authorized. This software is owned by -// Renesas Electronics Corporation and is protected under all applicable laws, including -// copyright laws. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -// THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -// ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED NOT -// PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED -// COMPANIES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -// DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -// -// Renesas reserves the right, without notice, to make changes to this software and to -// discontinue the availability of this software. By using this software, you agree to -// the additional terms and conditions found by accessing the following link: -// http://www.renesas.com/disclaimer -// \n - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa6m1ad.go b/device/renesas/r7fa6m1ad.go index f4b8894..e43fd43 100644 --- a/device/renesas/r7fa6m1ad.go +++ b/device/renesas/r7fa6m1ad.go @@ -10,7 +10,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -319,8 +319,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa6m1ad.s b/device/renesas/r7fa6m1ad.s deleted file mode 100644 index 4e59306..0000000 --- a/device/renesas/r7fa6m1ad.s +++ /dev/null @@ -1,259 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA6M1AD.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm 32-bit Cortex-M4F Microcontroller based device, CPU clock up to 120MHz, etc. -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa6m2af.go b/device/renesas/r7fa6m2af.go index a5d8d7e..ea4b834 100644 --- a/device/renesas/r7fa6m2af.go +++ b/device/renesas/r7fa6m2af.go @@ -10,7 +10,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -319,8 +319,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa6m2af.s b/device/renesas/r7fa6m2af.s deleted file mode 100644 index 3a58e06..0000000 --- a/device/renesas/r7fa6m2af.s +++ /dev/null @@ -1,259 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA6M2AF.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// ARM 32-bit Cortex-M4F Microcontroller based device, CPU clock up to 120MHz, etc. -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa6m3ah.go b/device/renesas/r7fa6m3ah.go index 9675cb6..673fd30 100644 --- a/device/renesas/r7fa6m3ah.go +++ b/device/renesas/r7fa6m3ah.go @@ -10,7 +10,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -319,8 +319,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa6m3ah.s b/device/renesas/r7fa6m3ah.s deleted file mode 100644 index e8985a8..0000000 --- a/device/renesas/r7fa6m3ah.s +++ /dev/null @@ -1,259 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA6M3AH.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// ARM 32-bit Cortex-M4F Microcontroller based device, CPU clock up to 120MHz, etc. -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa6m4af.go b/device/renesas/r7fa6m4af.go index 441be80..490b1ad 100644 --- a/device/renesas/r7fa6m4af.go +++ b/device/renesas/r7fa6m4af.go @@ -28,7 +28,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -337,8 +337,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa6m4af.s b/device/renesas/r7fa6m4af.s deleted file mode 100644 index ce4a87d..0000000 --- a/device/renesas/r7fa6m4af.s +++ /dev/null @@ -1,277 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA6M4AF.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm Cortex-M33 based Microcontroller RA6M4 group -*/ - -// This software is supplied by Renesas Electronics Corporation and is only intended for -// use with Renesas products. No other uses are authorized. This software is owned by -// Renesas Electronics Corporation and is protected under all applicable laws, including -// copyright laws. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -// THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -// ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED NOT -// PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED -// COMPANIES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -// DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -// -// Renesas reserves the right, without notice, to make changes to this software and to -// discontinue the availability of this software. By using this software, you agree to -// the additional terms and conditions found by accessing the following link: -// http://www.renesas.com/disclaimer -// \n - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa6m5bh.go b/device/renesas/r7fa6m5bh.go index dd2da71..dd36c96 100644 --- a/device/renesas/r7fa6m5bh.go +++ b/device/renesas/r7fa6m5bh.go @@ -28,7 +28,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -337,8 +337,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa6m5bh.s b/device/renesas/r7fa6m5bh.s deleted file mode 100644 index e637e82..0000000 --- a/device/renesas/r7fa6m5bh.s +++ /dev/null @@ -1,277 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA6M5BH.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm Cortex-M33 based Microcontroller RA6M5 group -*/ - -// This software is supplied by Renesas Electronics Corporation and is only intended for -// use with Renesas products. No other uses are authorized. This software is owned by -// Renesas Electronics Corporation and is protected under all applicable laws, including -// copyright laws. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -// THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -// ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED NOT -// PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED -// COMPANIES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -// DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -// -// Renesas reserves the right, without notice, to make changes to this software and to -// discontinue the availability of this software. By using this software, you agree to -// the additional terms and conditions found by accessing the following link: -// http://www.renesas.com/disclaimer -// \n - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa6t1ad.go b/device/renesas/r7fa6t1ad.go index 716c5bf..d6a243f 100644 --- a/device/renesas/r7fa6t1ad.go +++ b/device/renesas/r7fa6t1ad.go @@ -10,7 +10,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -319,8 +319,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa6t1ad.s b/device/renesas/r7fa6t1ad.s deleted file mode 100644 index 24101f1..0000000 --- a/device/renesas/r7fa6t1ad.s +++ /dev/null @@ -1,259 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA6T1AD.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm 32-bit Cortex-M4F Microcontroller based device, CPU clock up to 120MHz, etc. -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa6t2bd.go b/device/renesas/r7fa6t2bd.go index ede2cad..db4ed31 100644 --- a/device/renesas/r7fa6t2bd.go +++ b/device/renesas/r7fa6t2bd.go @@ -28,7 +28,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -337,8 +337,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa6t2bd.s b/device/renesas/r7fa6t2bd.s deleted file mode 100644 index de58f92..0000000 --- a/device/renesas/r7fa6t2bd.s +++ /dev/null @@ -1,277 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA6T2BD.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm Cortex-M33 based Microcontroller RA6T2 group -*/ - -// This software is supplied by Renesas Electronics Corporation and is only intended for -// use with Renesas products. No other uses are authorized. This software is owned by -// Renesas Electronics Corporation and is protected under all applicable laws, including -// copyright laws. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -// THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -// ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED NOT -// PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED -// COMPANIES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -// DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -// -// Renesas reserves the right, without notice, to make changes to this software and to -// discontinue the availability of this software. By using this software, you agree to -// the additional terms and conditions found by accessing the following link: -// http://www.renesas.com/disclaimer -// \n - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/renesas/r7fa6t3bb.go b/device/renesas/r7fa6t3bb.go index 2418151..999ed6b 100644 --- a/device/renesas/r7fa6t3bb.go +++ b/device/renesas/r7fa6t3bb.go @@ -28,7 +28,7 @@ package renesas import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -337,8 +337,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export IEL0_IRQHandler func interruptIEL0() { diff --git a/device/renesas/r7fa6t3bb.s b/device/renesas/r7fa6t3bb.s deleted file mode 100644 index 25f915f..0000000 --- a/device/renesas/r7fa6t3bb.s +++ /dev/null @@ -1,277 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from R7FA6T3BB.svd, see https://github.com/cmsis-svd/cmsis-svd-data/tree/master/data/Renesas - -/* -// Arm Cortex-M33 based Microcontroller RA6T3 group -*/ - -// This software is supplied by Renesas Electronics Corporation and is only intended for -// use with Renesas products. No other uses are authorized. This software is owned by -// Renesas Electronics Corporation and is protected under all applicable laws, including -// copyright laws. -// -// THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING -// THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO -// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -// ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED NOT -// PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED -// COMPANIES SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL -// DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE -// BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -// -// Renesas reserves the right, without notice, to make changes to this software and to -// discontinue the availability of this software. By using this software, you agree to -// the additional terms and conditions found by accessing the following link: -// http://www.renesas.com/disclaimer -// \n - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long IEL0_IRQHandler - .long IEL1_IRQHandler - .long IEL2_IRQHandler - .long IEL3_IRQHandler - .long IEL4_IRQHandler - .long IEL5_IRQHandler - .long IEL6_IRQHandler - .long IEL7_IRQHandler - .long IEL8_IRQHandler - .long IEL9_IRQHandler - .long IEL10_IRQHandler - .long IEL11_IRQHandler - .long IEL12_IRQHandler - .long IEL13_IRQHandler - .long IEL14_IRQHandler - .long IEL15_IRQHandler - .long IEL16_IRQHandler - .long IEL17_IRQHandler - .long IEL18_IRQHandler - .long IEL19_IRQHandler - .long IEL20_IRQHandler - .long IEL21_IRQHandler - .long IEL22_IRQHandler - .long IEL23_IRQHandler - .long IEL24_IRQHandler - .long IEL25_IRQHandler - .long IEL26_IRQHandler - .long IEL27_IRQHandler - .long IEL28_IRQHandler - .long IEL29_IRQHandler - .long IEL30_IRQHandler - .long IEL31_IRQHandler - .long IEL32_IRQHandler - .long IEL33_IRQHandler - .long IEL34_IRQHandler - .long IEL35_IRQHandler - .long IEL36_IRQHandler - .long IEL37_IRQHandler - .long IEL38_IRQHandler - .long IEL39_IRQHandler - .long IEL40_IRQHandler - .long IEL41_IRQHandler - .long IEL42_IRQHandler - .long IEL43_IRQHandler - .long IEL44_IRQHandler - .long IEL45_IRQHandler - .long IEL46_IRQHandler - .long IEL47_IRQHandler - .long IEL48_IRQHandler - .long IEL49_IRQHandler - .long IEL50_IRQHandler - .long IEL51_IRQHandler - .long IEL52_IRQHandler - .long IEL53_IRQHandler - .long IEL54_IRQHandler - .long IEL55_IRQHandler - .long IEL56_IRQHandler - .long IEL57_IRQHandler - .long IEL58_IRQHandler - .long IEL59_IRQHandler - .long IEL60_IRQHandler - .long IEL61_IRQHandler - .long IEL62_IRQHandler - .long IEL63_IRQHandler - .long IEL64_IRQHandler - .long IEL65_IRQHandler - .long IEL66_IRQHandler - .long IEL67_IRQHandler - .long IEL68_IRQHandler - .long IEL69_IRQHandler - .long IEL70_IRQHandler - .long IEL71_IRQHandler - .long IEL72_IRQHandler - .long IEL73_IRQHandler - .long IEL74_IRQHandler - .long IEL75_IRQHandler - .long IEL76_IRQHandler - .long IEL77_IRQHandler - .long IEL78_IRQHandler - .long IEL79_IRQHandler - .long IEL80_IRQHandler - .long IEL81_IRQHandler - .long IEL82_IRQHandler - .long IEL83_IRQHandler - .long IEL84_IRQHandler - .long IEL85_IRQHandler - .long IEL86_IRQHandler - .long IEL87_IRQHandler - .long IEL88_IRQHandler - .long IEL89_IRQHandler - .long IEL90_IRQHandler - .long IEL91_IRQHandler - .long IEL92_IRQHandler - .long IEL93_IRQHandler - .long IEL94_IRQHandler - .long IEL95_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ IEL0_IRQHandler - IRQ IEL1_IRQHandler - IRQ IEL2_IRQHandler - IRQ IEL3_IRQHandler - IRQ IEL4_IRQHandler - IRQ IEL5_IRQHandler - IRQ IEL6_IRQHandler - IRQ IEL7_IRQHandler - IRQ IEL8_IRQHandler - IRQ IEL9_IRQHandler - IRQ IEL10_IRQHandler - IRQ IEL11_IRQHandler - IRQ IEL12_IRQHandler - IRQ IEL13_IRQHandler - IRQ IEL14_IRQHandler - IRQ IEL15_IRQHandler - IRQ IEL16_IRQHandler - IRQ IEL17_IRQHandler - IRQ IEL18_IRQHandler - IRQ IEL19_IRQHandler - IRQ IEL20_IRQHandler - IRQ IEL21_IRQHandler - IRQ IEL22_IRQHandler - IRQ IEL23_IRQHandler - IRQ IEL24_IRQHandler - IRQ IEL25_IRQHandler - IRQ IEL26_IRQHandler - IRQ IEL27_IRQHandler - IRQ IEL28_IRQHandler - IRQ IEL29_IRQHandler - IRQ IEL30_IRQHandler - IRQ IEL31_IRQHandler - IRQ IEL32_IRQHandler - IRQ IEL33_IRQHandler - IRQ IEL34_IRQHandler - IRQ IEL35_IRQHandler - IRQ IEL36_IRQHandler - IRQ IEL37_IRQHandler - IRQ IEL38_IRQHandler - IRQ IEL39_IRQHandler - IRQ IEL40_IRQHandler - IRQ IEL41_IRQHandler - IRQ IEL42_IRQHandler - IRQ IEL43_IRQHandler - IRQ IEL44_IRQHandler - IRQ IEL45_IRQHandler - IRQ IEL46_IRQHandler - IRQ IEL47_IRQHandler - IRQ IEL48_IRQHandler - IRQ IEL49_IRQHandler - IRQ IEL50_IRQHandler - IRQ IEL51_IRQHandler - IRQ IEL52_IRQHandler - IRQ IEL53_IRQHandler - IRQ IEL54_IRQHandler - IRQ IEL55_IRQHandler - IRQ IEL56_IRQHandler - IRQ IEL57_IRQHandler - IRQ IEL58_IRQHandler - IRQ IEL59_IRQHandler - IRQ IEL60_IRQHandler - IRQ IEL61_IRQHandler - IRQ IEL62_IRQHandler - IRQ IEL63_IRQHandler - IRQ IEL64_IRQHandler - IRQ IEL65_IRQHandler - IRQ IEL66_IRQHandler - IRQ IEL67_IRQHandler - IRQ IEL68_IRQHandler - IRQ IEL69_IRQHandler - IRQ IEL70_IRQHandler - IRQ IEL71_IRQHandler - IRQ IEL72_IRQHandler - IRQ IEL73_IRQHandler - IRQ IEL74_IRQHandler - IRQ IEL75_IRQHandler - IRQ IEL76_IRQHandler - IRQ IEL77_IRQHandler - IRQ IEL78_IRQHandler - IRQ IEL79_IRQHandler - IRQ IEL80_IRQHandler - IRQ IEL81_IRQHandler - IRQ IEL82_IRQHandler - IRQ IEL83_IRQHandler - IRQ IEL84_IRQHandler - IRQ IEL85_IRQHandler - IRQ IEL86_IRQHandler - IRQ IEL87_IRQHandler - IRQ IEL88_IRQHandler - IRQ IEL89_IRQHandler - IRQ IEL90_IRQHandler - IRQ IEL91_IRQHandler - IRQ IEL92_IRQHandler - IRQ IEL93_IRQHandler - IRQ IEL94_IRQHandler - IRQ IEL95_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/riscv/csr.go b/device/riscv/csr.go index 52e97a2..17a889b 100644 --- a/device/riscv/csr.go +++ b/device/riscv/csr.go @@ -8,17 +8,32 @@ package riscv type CSR int16 // Get returns the value of the given CSR. -func (csr CSR) Get() uintptr +func (csr CSR) Get() uintptr { + // TODO(zzy): implement tinygo/compiler/inlineasm.go emitCSROperation + panic("TODO: CSR.Get()") + return 0 +} // Set stores a new value in the given CSR. -func (csr CSR) Set(uintptr) +func (csr CSR) Set(uintptr) { + // TODO(zzy): implement tinygo/compiler/inlineasm.go emitCSROperation + panic("TODO: CSR.Set()") +} // SetBits atomically sets the given bits in this ISR and returns the old value. -func (csr CSR) SetBits(uintptr) uintptr +func (csr CSR) SetBits(uintptr) uintptr { + // TODO(zzy): implement tinygo/compiler/inlineasm.go emitCSROperation + panic("TODO: CSR.SetBits()") + return 0 +} // ClearBits atomically clears the given bits in this ISR and returns the old // value. -func (csr CSR) ClearBits(uintptr) uintptr +func (csr CSR) ClearBits(uintptr) uintptr { + // TODO(zzy): implement tinygo/compiler/inlineasm.go emitCSROperation + panic("TODO: CSR.ClearBits()") + return 0 +} // CSR values defined in the RISC-V privileged specification. Not all values may // be available on any given chip. diff --git a/device/riscv/handleinterrupt.S b/device/riscv/handleinterrupt.S deleted file mode 100644 index c206c01..0000000 --- a/device/riscv/handleinterrupt.S +++ /dev/null @@ -1,130 +0,0 @@ -#ifdef __riscv_flen -#define NREG 48 -#define LFREG flw -#define SFREG fsw -#else -#define NREG 16 -#endif - -#if __riscv_xlen==64 -#define REGSIZE 8 -#define SREG sd -#define LREG ld -#else -#define REGSIZE 4 -#define SREG sw -#define LREG lw -#endif - -.section .text.handleInterruptASM -.global handleInterruptASM -.type handleInterruptASM,@function -handleInterruptASM: - // Save and restore all registers, because the hardware only saves/restores - // the pc. - // Note: we have to do this in assembly because the "interrupt"="machine" - // attribute is broken in LLVM: https://bugs.llvm.org/show_bug.cgi?id=42984 - addi sp, sp, -NREG*REGSIZE - SREG ra, 0*REGSIZE(sp) - SREG t0, 1*REGSIZE(sp) - SREG t1, 2*REGSIZE(sp) - SREG t2, 3*REGSIZE(sp) - SREG a0, 4*REGSIZE(sp) - SREG a1, 5*REGSIZE(sp) - SREG a2, 6*REGSIZE(sp) - SREG a3, 7*REGSIZE(sp) - SREG a4, 8*REGSIZE(sp) - SREG a5, 9*REGSIZE(sp) - SREG a6, 10*REGSIZE(sp) - SREG a7, 11*REGSIZE(sp) - SREG t3, 12*REGSIZE(sp) - SREG t4, 13*REGSIZE(sp) - SREG t5, 14*REGSIZE(sp) - SREG t6, 15*REGSIZE(sp) -#ifdef __riscv_flen - SFREG f0, (0 + 16)*REGSIZE(sp) - SFREG f1, (1 + 16)*REGSIZE(sp) - SFREG f2, (2 + 16)*REGSIZE(sp) - SFREG f3, (3 + 16)*REGSIZE(sp) - SFREG f4, (4 + 16)*REGSIZE(sp) - SFREG f5, (5 + 16)*REGSIZE(sp) - SFREG f6, (6 + 16)*REGSIZE(sp) - SFREG f7, (7 + 16)*REGSIZE(sp) - SFREG f8, (8 + 16)*REGSIZE(sp) - SFREG f9, (9 + 16)*REGSIZE(sp) - SFREG f10,(10 + 16)*REGSIZE(sp) - SFREG f11,(11 + 16)*REGSIZE(sp) - SFREG f12,(12 + 16)*REGSIZE(sp) - SFREG f13,(13 + 16)*REGSIZE(sp) - SFREG f14,(14 + 16)*REGSIZE(sp) - SFREG f15,(15 + 16)*REGSIZE(sp) - SFREG f16,(16 + 16)*REGSIZE(sp) - SFREG f17,(17 + 16)*REGSIZE(sp) - SFREG f18,(18 + 16)*REGSIZE(sp) - SFREG f19,(19 + 16)*REGSIZE(sp) - SFREG f20,(20 + 16)*REGSIZE(sp) - SFREG f21,(21 + 16)*REGSIZE(sp) - SFREG f22,(22 + 16)*REGSIZE(sp) - SFREG f23,(23 + 16)*REGSIZE(sp) - SFREG f24,(24 + 16)*REGSIZE(sp) - SFREG f25,(25 + 16)*REGSIZE(sp) - SFREG f26,(26 + 16)*REGSIZE(sp) - SFREG f27,(27 + 16)*REGSIZE(sp) - SFREG f28,(28 + 16)*REGSIZE(sp) - SFREG f29,(29 + 16)*REGSIZE(sp) - SFREG f30,(30 + 16)*REGSIZE(sp) - SFREG f31,(31 + 16)*REGSIZE(sp) -#endif - call handleInterrupt -#ifdef __riscv_flen - LFREG f0, (31 + 16)*REGSIZE(sp) - LFREG f1, (30 + 16)*REGSIZE(sp) - LFREG f2, (29 + 16)*REGSIZE(sp) - LFREG f3, (28 + 16)*REGSIZE(sp) - LFREG f4, (27 + 16)*REGSIZE(sp) - LFREG f5, (26 + 16)*REGSIZE(sp) - LFREG f6, (25 + 16)*REGSIZE(sp) - LFREG f7, (24 + 16)*REGSIZE(sp) - LFREG f8, (23 + 16)*REGSIZE(sp) - LFREG f9, (22 + 16)*REGSIZE(sp) - LFREG f10,(21 + 16)*REGSIZE(sp) - LFREG f11,(20 + 16)*REGSIZE(sp) - LFREG f12,(19 + 16)*REGSIZE(sp) - LFREG f13,(18 + 16)*REGSIZE(sp) - LFREG f14,(17 + 16)*REGSIZE(sp) - LFREG f15,(16 + 16)*REGSIZE(sp) - LFREG f16,(15 + 16)*REGSIZE(sp) - LFREG f17,(14 + 16)*REGSIZE(sp) - LFREG f18,(13 + 16)*REGSIZE(sp) - LFREG f19,(12 + 16)*REGSIZE(sp) - LFREG f20,(11 + 16)*REGSIZE(sp) - LFREG f21,(10 + 16)*REGSIZE(sp) - LFREG f22,(9 + 16)*REGSIZE(sp) - LFREG f23,(8 + 16)*REGSIZE(sp) - LFREG f24,(7 + 16)*REGSIZE(sp) - LFREG f25,(6 + 16)*REGSIZE(sp) - LFREG f26,(5 + 16)*REGSIZE(sp) - LFREG f27,(4 + 16)*REGSIZE(sp) - LFREG f28,(3 + 16)*REGSIZE(sp) - LFREG f29,(2 + 16)*REGSIZE(sp) - LFREG f30,(1 + 16)*REGSIZE(sp) - LFREG f31,(0 + 16)*REGSIZE(sp) -#endif - LREG t6, 15*REGSIZE(sp) - LREG t5, 14*REGSIZE(sp) - LREG t4, 13*REGSIZE(sp) - LREG t3, 12*REGSIZE(sp) - LREG a7, 11*REGSIZE(sp) - LREG a6, 10*REGSIZE(sp) - LREG a5, 9*REGSIZE(sp) - LREG a4, 8*REGSIZE(sp) - LREG a3, 7*REGSIZE(sp) - LREG a2, 6*REGSIZE(sp) - LREG a1, 5*REGSIZE(sp) - LREG a0, 4*REGSIZE(sp) - LREG t2, 3*REGSIZE(sp) - LREG t1, 2*REGSIZE(sp) - LREG t0, 1*REGSIZE(sp) - LREG ra, 0*REGSIZE(sp) - addi sp, sp, NREG*REGSIZE - mret diff --git a/device/riscv/riscv.go b/device/riscv/riscv.go index 1c3c3e6..cc2dea2 100644 --- a/device/riscv/riscv.go +++ b/device/riscv/riscv.go @@ -3,7 +3,9 @@ package riscv // Run the given assembly code. The code will be marked as having side effects, // as it doesn't produce output and thus would normally be eliminated by the // optimizer. -func Asm(asm string) +// +//llgo:link Asm llgo.asm +func Asm(asm string) {} // Run the given inline assembly. The code will be marked as having side // effects, as it would otherwise be optimized away. The inline assembly string @@ -18,7 +20,11 @@ func Asm(asm string) // // You can use {} in the asm string (which expands to a register) to set the // return value. -func AsmFull(asm string, regs map[string]interface{}) uintptr +// +//llgo:link AsmFull llgo.asm +func AsmFull(asm string, regs map[string]interface{}) uintptr { + return 0 +} // DisableInterrupts disables all interrupts, and returns the old interrupt // state. diff --git a/device/riscv/start.S b/device/riscv/start.S deleted file mode 100644 index d67d82d..0000000 --- a/device/riscv/start.S +++ /dev/null @@ -1,59 +0,0 @@ -.section .init -.global _start -.type _start,@function - -_start: - // If we're on a multicore system, we need to wait for hart 0 to wake us up. -#if TINYGO_CORES > 1 - csrr a0, mhartid - - // Hart 0 stack - bnez a0, 1f - la sp, _stack_top - -1: - // Hart 1 stack - li a1, 1 - bne a0, a1, 2f - la sp, _stack1_top - -2: - // Hart 2 stack - #if TINYGO_CORES >= 3 - li a1, 2 - bne a0, a1, 3f - la sp, _stack2_top - #endif - -3: - // Hart 3 stack - #if TINYGO_CORES >= 4 - li a1, 3 - bne a0, a1, 4f - la sp, _stack3_top - #endif - -4: - // done - -#if TINYGO_CORES > 4 -#error only up to 4 cores are supported at the moment! -#endif - -#else - // Load the stack pointer. - la sp, _stack_top -#endif - - // Load the globals pointer. The program will load pointers relative to this - // register, so it must be set to the right value on startup. - // See: https://gnu-mcu-eclipse.github.io/arch/riscv/programmer/#the-gp-global-pointer-register - // Linker relaxations must be disabled to avoid the initialization beign - // relaxed with an uninitialized global pointer: mv gp, gp - .option push - .option norelax - la gp, __global_pointer$ - .option pop - - // Jump to runtime.main - call main diff --git a/device/rp/rp2040.go b/device/rp/rp2040.go index 23e359a..e96e86e 100644 --- a/device/rp/rp2040.go +++ b/device/rp/rp2040.go @@ -12,7 +12,7 @@ package rp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -139,8 +139,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export TIMER_IRQ_0_IRQHandler func interruptTIMER_IRQ_0() { diff --git a/device/rp/rp2040.s b/device/rp/rp2040.s deleted file mode 100644 index 2063d7d..0000000 --- a/device/rp/rp2040.s +++ /dev/null @@ -1,121 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from rp2040.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/RaspberryPi - -/* - -*/ - -// Copyright (c) 2020 Raspberry Pi (Trading) Ltd. -// -// SPDX-License-Identifier: BSD-3-Clause - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long TIMER_IRQ_0_IRQHandler - .long TIMER_IRQ_1_IRQHandler - .long TIMER_IRQ_2_IRQHandler - .long TIMER_IRQ_3_IRQHandler - .long PWM_IRQ_WRAP_IRQHandler - .long USBCTRL_IRQ_IRQHandler - .long XIP_IRQ_IRQHandler - .long PIO0_IRQ_0_IRQHandler - .long PIO0_IRQ_1_IRQHandler - .long PIO1_IRQ_0_IRQHandler - .long PIO1_IRQ_1_IRQHandler - .long DMA_IRQ_0_IRQHandler - .long DMA_IRQ_1_IRQHandler - .long IO_IRQ_BANK0_IRQHandler - .long IO_IRQ_QSPI_IRQHandler - .long SIO_IRQ_PROC0_IRQHandler - .long SIO_IRQ_PROC1_IRQHandler - .long CLOCKS_IRQ_IRQHandler - .long SPI0_IRQ_IRQHandler - .long SPI1_IRQ_IRQHandler - .long UART0_IRQ_IRQHandler - .long UART1_IRQ_IRQHandler - .long ADC_IRQ_FIFO_IRQHandler - .long I2C0_IRQ_IRQHandler - .long I2C1_IRQ_IRQHandler - .long RTC_IRQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ TIMER_IRQ_0_IRQHandler - IRQ TIMER_IRQ_1_IRQHandler - IRQ TIMER_IRQ_2_IRQHandler - IRQ TIMER_IRQ_3_IRQHandler - IRQ PWM_IRQ_WRAP_IRQHandler - IRQ USBCTRL_IRQ_IRQHandler - IRQ XIP_IRQ_IRQHandler - IRQ PIO0_IRQ_0_IRQHandler - IRQ PIO0_IRQ_1_IRQHandler - IRQ PIO1_IRQ_0_IRQHandler - IRQ PIO1_IRQ_1_IRQHandler - IRQ DMA_IRQ_0_IRQHandler - IRQ DMA_IRQ_1_IRQHandler - IRQ IO_IRQ_BANK0_IRQHandler - IRQ IO_IRQ_QSPI_IRQHandler - IRQ SIO_IRQ_PROC0_IRQHandler - IRQ SIO_IRQ_PROC1_IRQHandler - IRQ CLOCKS_IRQ_IRQHandler - IRQ SPI0_IRQ_IRQHandler - IRQ SPI1_IRQ_IRQHandler - IRQ UART0_IRQ_IRQHandler - IRQ UART1_IRQ_IRQHandler - IRQ ADC_IRQ_FIFO_IRQHandler - IRQ I2C0_IRQ_IRQHandler - IRQ I2C1_IRQ_IRQHandler - IRQ RTC_IRQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/rp/rp2350.go b/device/rp/rp2350.go index 0300cda..ea0a06f 100644 --- a/device/rp/rp2350.go +++ b/device/rp/rp2350.go @@ -36,7 +36,7 @@ package rp import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -169,8 +169,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export TIMER0_IRQ_0_IRQHandler func interruptTIMER0_IRQ_0() { diff --git a/device/rp/rp2350.s b/device/rp/rp2350.s deleted file mode 100644 index 10279f2..0000000 --- a/device/rp/rp2350.s +++ /dev/null @@ -1,183 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from rp2350.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/RaspberryPi - -/* -// -// Dual Cortex-M33 or Hazard3 processors at 150MHz -// 520kB on-chip SRAM, in 10 independent banks -// Extended low-power sleep states with optional SRAM retention: as low as 10uA DVDD -// 8kB of one-time-programmable storage (OTP) -// Up to 16MB of external QSPI flash/PSRAM via dedicated QSPI bus -// Additional 16MB flash/PSRAM accessible via optional second chip-select -// On-chip switched-mode power supply to generate core voltage -// Low-quiescent-current LDO mode can be enabled for sleep states -// 2x on-chip PLLs for internal or external clock generation -// GPIOs are 5V-tolerant (powered), and 3.3V-failsafe (unpowered) -// Security features: -// Optional boot signing, enforced by on-chip mask ROM, with key fingerprint in OTP -// Protected OTP storage for optional boot decryption key -// Global bus filtering based on Arm or RISC-V security/privilege levels -// Peripherals, GPIOs and DMA channels individually assignable to security domains -// Hardware mitigations for fault injection attacks -// Hardware SHA-256 accelerator -// Peripherals: -// 2x UARTs -// 2x SPI controllers -// 2x I2C controllers -// 24x PWM channels -// USB 1.1 controller and PHY, with host and device support -// 12x PIO state machines -// 1x HSTX peripheral -// -*/ - -// Copyright (c) 2024 Raspberry Pi Ltd. SPDX-License-Identifier: BSD-3-Clause - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long TIMER0_IRQ_0_IRQHandler - .long TIMER0_IRQ_1_IRQHandler - .long TIMER0_IRQ_2_IRQHandler - .long TIMER0_IRQ_3_IRQHandler - .long TIMER1_IRQ_0_IRQHandler - .long TIMER1_IRQ_1_IRQHandler - .long TIMER1_IRQ_2_IRQHandler - .long TIMER1_IRQ_3_IRQHandler - .long PWM_IRQ_WRAP_0_IRQHandler - .long PWM_IRQ_WRAP_1_IRQHandler - .long DMA_IRQ_0_IRQHandler - .long DMA_IRQ_1_IRQHandler - .long DMA_IRQ_2_IRQHandler - .long DMA_IRQ_3_IRQHandler - .long USBCTRL_IRQ_IRQHandler - .long PIO0_IRQ_0_IRQHandler - .long PIO0_IRQ_1_IRQHandler - .long PIO1_IRQ_0_IRQHandler - .long PIO1_IRQ_1_IRQHandler - .long PIO2_IRQ_0_IRQHandler - .long PIO2_IRQ_1_IRQHandler - .long IO_IRQ_BANK0_IRQHandler - .long IO_IRQ_BANK0_NS_IRQHandler - .long IO_IRQ_QSPI_IRQHandler - .long IO_IRQ_QSPI_NS_IRQHandler - .long SIO_IRQ_FIFO_IRQHandler - .long SIO_IRQ_BELL_IRQHandler - .long SIO_IRQ_FIFO_NS_IRQHandler - .long SIO_IRQ_BELL_NS_IRQHandler - .long SIO_IRQ_MTIMECMP_IRQHandler - .long CLOCKS_IRQ_IRQHandler - .long SPI0_IRQ_IRQHandler - .long SPI1_IRQ_IRQHandler - .long UART0_IRQ_IRQHandler - .long UART1_IRQ_IRQHandler - .long ADC_IRQ_FIFO_IRQHandler - .long I2C0_IRQ_IRQHandler - .long I2C1_IRQ_IRQHandler - .long OTP_IRQ_IRQHandler - .long TRNG_IRQ_IRQHandler - .long 0 - .long 0 - .long PLL_SYS_IRQ_IRQHandler - .long PLL_USB_IRQ_IRQHandler - .long POWMAN_IRQ_POW_IRQHandler - .long POWMAN_IRQ_TIMER_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ TIMER0_IRQ_0_IRQHandler - IRQ TIMER0_IRQ_1_IRQHandler - IRQ TIMER0_IRQ_2_IRQHandler - IRQ TIMER0_IRQ_3_IRQHandler - IRQ TIMER1_IRQ_0_IRQHandler - IRQ TIMER1_IRQ_1_IRQHandler - IRQ TIMER1_IRQ_2_IRQHandler - IRQ TIMER1_IRQ_3_IRQHandler - IRQ PWM_IRQ_WRAP_0_IRQHandler - IRQ PWM_IRQ_WRAP_1_IRQHandler - IRQ DMA_IRQ_0_IRQHandler - IRQ DMA_IRQ_1_IRQHandler - IRQ DMA_IRQ_2_IRQHandler - IRQ DMA_IRQ_3_IRQHandler - IRQ USBCTRL_IRQ_IRQHandler - IRQ PIO0_IRQ_0_IRQHandler - IRQ PIO0_IRQ_1_IRQHandler - IRQ PIO1_IRQ_0_IRQHandler - IRQ PIO1_IRQ_1_IRQHandler - IRQ PIO2_IRQ_0_IRQHandler - IRQ PIO2_IRQ_1_IRQHandler - IRQ IO_IRQ_BANK0_IRQHandler - IRQ IO_IRQ_BANK0_NS_IRQHandler - IRQ IO_IRQ_QSPI_IRQHandler - IRQ IO_IRQ_QSPI_NS_IRQHandler - IRQ SIO_IRQ_FIFO_IRQHandler - IRQ SIO_IRQ_BELL_IRQHandler - IRQ SIO_IRQ_FIFO_NS_IRQHandler - IRQ SIO_IRQ_BELL_NS_IRQHandler - IRQ SIO_IRQ_MTIMECMP_IRQHandler - IRQ CLOCKS_IRQ_IRQHandler - IRQ SPI0_IRQ_IRQHandler - IRQ SPI1_IRQ_IRQHandler - IRQ UART0_IRQ_IRQHandler - IRQ UART1_IRQ_IRQHandler - IRQ ADC_IRQ_FIFO_IRQHandler - IRQ I2C0_IRQ_IRQHandler - IRQ I2C1_IRQ_IRQHandler - IRQ OTP_IRQ_IRQHandler - IRQ TRNG_IRQ_IRQHandler - IRQ PLL_SYS_IRQ_IRQHandler - IRQ PLL_USB_IRQ_IRQHandler - IRQ POWMAN_IRQ_POW_IRQHandler - IRQ POWMAN_IRQ_TIMER_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/at91sam9cn11.go b/device/sam/at91sam9cn11.go index 9bd4ddd..ef99355 100644 --- a/device/sam/at91sam9cn11.go +++ b/device/sam/at91sam9cn11.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -109,8 +109,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/at91sam9cn11.s b/device/sam/at91sam9cn11.s deleted file mode 100644 index b87eb9f..0000000 --- a/device/sam/at91sam9cn11.s +++ /dev/null @@ -1,126 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from AT91SAM9CN11.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel AT91SAM9CN11 device: ARM926EJ Embedded Microprocessor Unit, 400MHz, Crypto engine, LCD, USB, LPDDR/DDR2/MLC NAND support, 217 Pins (refer to http://www.atmel.com/devices/SAM9CN11.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long DBGU_IRQHandler - .long PIOA_IRQHandler - .long PIOC_IRQHandler - .long FUSE_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long TC0_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DMAC_IRQHandler - .long 0 - .long 0 - .long UDP_IRQHandler - .long 0 - .long LCDC_IRQHandler - .long 0 - .long SHA_IRQHandler - .long SSC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long IRQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ DBGU_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOC_IRQHandler - IRQ FUSE_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ TC0_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UDP_IRQHandler - IRQ LCDC_IRQHandler - IRQ SHA_IRQHandler - IRQ SSC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ IRQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/at91sam9cn12.go b/device/sam/at91sam9cn12.go index 0e657bb..512255e 100644 --- a/device/sam/at91sam9cn12.go +++ b/device/sam/at91sam9cn12.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -109,8 +109,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/at91sam9cn12.s b/device/sam/at91sam9cn12.s deleted file mode 100644 index 212c0f6..0000000 --- a/device/sam/at91sam9cn12.s +++ /dev/null @@ -1,126 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from AT91SAM9CN12.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel AT91SAM9CN12 device: ARM926EJ Embedded Microprocessor Unit, 400MHz, Secure BootROM, Crypto engine, LCD, USB, LPDDR/DDR2/MLC NAND support, 217 Pins (refer to http://www.atmel.com/devices/SAM9CN12.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long DBGU_IRQHandler - .long PIOA_IRQHandler - .long PIOC_IRQHandler - .long FUSE_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long TC0_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DMAC_IRQHandler - .long 0 - .long 0 - .long UDP_IRQHandler - .long 0 - .long LCDC_IRQHandler - .long 0 - .long SHA_IRQHandler - .long SSC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long IRQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ DBGU_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOC_IRQHandler - IRQ FUSE_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ TC0_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UDP_IRQHandler - IRQ LCDC_IRQHandler - IRQ SHA_IRQHandler - IRQ SSC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ IRQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/at91sam9g10.go b/device/sam/at91sam9g10.go index a095a36..cdab35c 100644 --- a/device/sam/at91sam9g10.go +++ b/device/sam/at91sam9g10.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -100,8 +100,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/at91sam9g10.s b/device/sam/at91sam9g10.s deleted file mode 100644 index fcea018..0000000 --- a/device/sam/at91sam9g10.s +++ /dev/null @@ -1,123 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from AT91SAM9G10.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel AT91SAM9G10 device: ARM926EJ Embedded Microprocessor Unit, 266MHz, LCD, USB, 217 Pins (refer to http://www.atmel.com/devices/SAM9G10.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long DBGU_IRQHandler - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long MCI_IRQHandler - .long UDP_IRQHandler - .long TWI_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long SSC0_IRQHandler - .long SSC1_IRQHandler - .long SSC2_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long UHP_IRQHandler - .long LCDC_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long IRQ0_IRQHandler - .long IRQ1_IRQHandler - .long IRQ2_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ DBGU_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ MCI_IRQHandler - IRQ UDP_IRQHandler - IRQ TWI_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ SSC0_IRQHandler - IRQ SSC1_IRQHandler - IRQ SSC2_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ UHP_IRQHandler - IRQ LCDC_IRQHandler - IRQ IRQ0_IRQHandler - IRQ IRQ1_IRQHandler - IRQ IRQ2_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/at91sam9g15.go b/device/sam/at91sam9g15.go index 37e2e6c..a8cbf6a 100644 --- a/device/sam/at91sam9g15.go +++ b/device/sam/at91sam9g15.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -106,8 +106,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/at91sam9g15.s b/device/sam/at91sam9g15.s deleted file mode 100644 index 301a531..0000000 --- a/device/sam/at91sam9g15.s +++ /dev/null @@ -1,125 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from AT91SAM9G15.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel AT91SAM9G15 device: ARM926EJ Embedded Microprocessor Unit, 400MHz, LCD, Touchscreen, HS USB, LPDDR/DDR2/MLC NAND support, 217 Pins (refer to http://www.atmel.com/devices/SAM9G15.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long DBGU_IRQHandler - .long PIOA_IRQHandler - .long PIOC_IRQHandler - .long SMD_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long TWI2_IRQHandler - .long HSMCI0_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long TC0_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DMAC0_IRQHandler - .long DMAC1_IRQHandler - .long 0 - .long UDPHS_IRQHandler - .long 0 - .long LCDC_IRQHandler - .long HSMCI1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long 0 - .long 0 - .long IRQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ DBGU_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOC_IRQHandler - IRQ SMD_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ TWI2_IRQHandler - IRQ HSMCI0_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ TC0_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC0_IRQHandler - IRQ DMAC1_IRQHandler - IRQ UDPHS_IRQHandler - IRQ LCDC_IRQHandler - IRQ HSMCI1_IRQHandler - IRQ SSC_IRQHandler - IRQ IRQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/at91sam9g20.go b/device/sam/at91sam9g20.go index a8fb591..98eadf2 100644 --- a/device/sam/at91sam9g20.go +++ b/device/sam/at91sam9g20.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -118,8 +118,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/at91sam9g20.s b/device/sam/at91sam9g20.s deleted file mode 100644 index bfd6fb7..0000000 --- a/device/sam/at91sam9g20.s +++ /dev/null @@ -1,129 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from AT91SAM9G20.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel AT91SAM9G20 device: ARM926EJ Embedded Microprocessor Unit, 400MHz, USB, Ethernet, 217 and 247 Pins (refer to http://www.atmel.com/devices/SAM9G20.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long DBGU_IRQHandler - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long ADC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long MCI_IRQHandler - .long UDP_IRQHandler - .long TWI_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long SSC0_IRQHandler - .long 0 - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long UHP_IRQHandler - .long EMAC_IRQHandler - .long ISI_IRQHandler - .long USART3_IRQHandler - .long USART4_IRQHandler - .long USART5_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long IRQ0_IRQHandler - .long IRQ1_IRQHandler - .long IRQ2_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ DBGU_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ ADC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ MCI_IRQHandler - IRQ UDP_IRQHandler - IRQ TWI_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ SSC0_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ UHP_IRQHandler - IRQ EMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ USART3_IRQHandler - IRQ USART4_IRQHandler - IRQ USART5_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ IRQ0_IRQHandler - IRQ IRQ1_IRQHandler - IRQ IRQ2_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/at91sam9g25.go b/device/sam/at91sam9g25.go index 7b405f9..49627d2 100644 --- a/device/sam/at91sam9g25.go +++ b/device/sam/at91sam9g25.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -112,8 +112,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/at91sam9g25.s b/device/sam/at91sam9g25.s deleted file mode 100644 index 41f0f77..0000000 --- a/device/sam/at91sam9g25.s +++ /dev/null @@ -1,127 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from AT91SAM9G25.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel AT91SAM9G25 device: ARM926EJ Embedded Microprocessor Unit, 400MHz, Ethernet, HS USB, LPDDR/DDR2/MLC NAND support, 217 and 247 Pins (refer to http://www.atmel.com/devices/SAM9G25.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long DBGU_IRQHandler - .long PIOA_IRQHandler - .long PIOC_IRQHandler - .long SMD_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long TWI2_IRQHandler - .long HSMCI0_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long TC0_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DMAC0_IRQHandler - .long DMAC1_IRQHandler - .long 0 - .long UDPHS_IRQHandler - .long EMAC_IRQHandler - .long ISI_IRQHandler - .long HSMCI1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long 0 - .long 0 - .long IRQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ DBGU_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOC_IRQHandler - IRQ SMD_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ TWI2_IRQHandler - IRQ HSMCI0_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ TC0_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC0_IRQHandler - IRQ DMAC1_IRQHandler - IRQ UDPHS_IRQHandler - IRQ EMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ HSMCI1_IRQHandler - IRQ SSC_IRQHandler - IRQ IRQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/at91sam9g35.go b/device/sam/at91sam9g35.go index 92e636e..892a954 100644 --- a/device/sam/at91sam9g35.go +++ b/device/sam/at91sam9g35.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -109,8 +109,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/at91sam9g35.s b/device/sam/at91sam9g35.s deleted file mode 100644 index 0532fac..0000000 --- a/device/sam/at91sam9g35.s +++ /dev/null @@ -1,126 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from AT91SAM9G35.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel AT91SAM9G35 device: ARM926EJ Embedded Microprocessor Unit, 400MHz, LCD, Touchscreen, Ethernet, HS USB, LPDDR/DDR2/MLC NAND support, 217 Pins (refer to http://www.atmel.com/devices/SAM9G35.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long DBGU_IRQHandler - .long PIOA_IRQHandler - .long PIOC_IRQHandler - .long SMD_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long TWI2_IRQHandler - .long HSMCI0_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long TC0_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DMAC0_IRQHandler - .long DMAC1_IRQHandler - .long 0 - .long UDPHS_IRQHandler - .long EMAC_IRQHandler - .long LCDC_IRQHandler - .long HSMCI1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long 0 - .long 0 - .long IRQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ DBGU_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOC_IRQHandler - IRQ SMD_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ TWI2_IRQHandler - IRQ HSMCI0_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ TC0_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC0_IRQHandler - IRQ DMAC1_IRQHandler - IRQ UDPHS_IRQHandler - IRQ EMAC_IRQHandler - IRQ LCDC_IRQHandler - IRQ HSMCI1_IRQHandler - IRQ SSC_IRQHandler - IRQ IRQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/at91sam9m10.go b/device/sam/at91sam9m10.go index 1ad0c67..c6cea24 100644 --- a/device/sam/at91sam9m10.go +++ b/device/sam/at91sam9m10.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -115,8 +115,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/at91sam9m10.s b/device/sam/at91sam9m10.s deleted file mode 100644 index aa56484..0000000 --- a/device/sam/at91sam9m10.s +++ /dev/null @@ -1,128 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from AT91SAM9M10.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel AT91SAM9M10 device: ARM926EJ Embedded Microprocessor Unit, 400MHz, DDR2/LPDDR, Video Decoder, LCD, HS USB, 10/100 Ethernet, Dual EBI, 324 Pins (refer to http://www.atmel.com/devices/SAM9M10.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long PIOD_IRQHandler - .long TRNG_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long HSMCI0_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long SSC0_IRQHandler - .long SSC1_IRQHandler - .long TC0_IRQHandler - .long PWM_IRQHandler - .long TSADCC_IRQHandler - .long DMAC_IRQHandler - .long 0 - .long LCDC_IRQHandler - .long AC97C_IRQHandler - .long EMAC_IRQHandler - .long ISI_IRQHandler - .long UDPHS_IRQHandler - .long 0 - .long HSMCI1_IRQHandler - .long VDEC_IRQHandler - .long IRQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ PIOD_IRQHandler - IRQ TRNG_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ HSMCI0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ SSC0_IRQHandler - IRQ SSC1_IRQHandler - IRQ TC0_IRQHandler - IRQ PWM_IRQHandler - IRQ TSADCC_IRQHandler - IRQ DMAC_IRQHandler - IRQ LCDC_IRQHandler - IRQ AC97C_IRQHandler - IRQ EMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ UDPHS_IRQHandler - IRQ HSMCI1_IRQHandler - IRQ VDEC_IRQHandler - IRQ IRQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/at91sam9m11.go b/device/sam/at91sam9m11.go index e3b1acd..9bf10fe 100644 --- a/device/sam/at91sam9m11.go +++ b/device/sam/at91sam9m11.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -121,8 +121,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/at91sam9m11.s b/device/sam/at91sam9m11.s deleted file mode 100644 index 4df528e..0000000 --- a/device/sam/at91sam9m11.s +++ /dev/null @@ -1,130 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from AT91SAM9M11.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel AT91SAM9M11 device: ARM926EJ Embedded Microprocessor Unit, 400MHz, Hardware Encryption, Video Decoder, DDR2/LPDDR, Dual EBI, 324 Pins (refer to http://www.atmel.com/devices/SAM9M11.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long DDRSDRC0_IRQHandler - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long PIOD_IRQHandler - .long TRNG_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long HSMCI0_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long SSC0_IRQHandler - .long SSC1_IRQHandler - .long TC0_IRQHandler - .long PWM_IRQHandler - .long TSADCC_IRQHandler - .long DMAC_IRQHandler - .long 0 - .long LCDC_IRQHandler - .long AC97C_IRQHandler - .long EMAC_IRQHandler - .long ISI_IRQHandler - .long UDPHS_IRQHandler - .long AES_IRQHandler - .long HSMCI1_IRQHandler - .long VDEC_IRQHandler - .long IRQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ DDRSDRC0_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ PIOD_IRQHandler - IRQ TRNG_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ HSMCI0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ SSC0_IRQHandler - IRQ SSC1_IRQHandler - IRQ TC0_IRQHandler - IRQ PWM_IRQHandler - IRQ TSADCC_IRQHandler - IRQ DMAC_IRQHandler - IRQ LCDC_IRQHandler - IRQ AC97C_IRQHandler - IRQ EMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ UDPHS_IRQHandler - IRQ AES_IRQHandler - IRQ HSMCI1_IRQHandler - IRQ VDEC_IRQHandler - IRQ IRQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/at91sam9n12.go b/device/sam/at91sam9n12.go index 8a162b7..d2b62e9 100644 --- a/device/sam/at91sam9n12.go +++ b/device/sam/at91sam9n12.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -103,8 +103,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/at91sam9n12.s b/device/sam/at91sam9n12.s deleted file mode 100644 index fff7ab8..0000000 --- a/device/sam/at91sam9n12.s +++ /dev/null @@ -1,124 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from AT91SAM9N12.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel AT91SAM9N12 device: ARM926EJ Embedded Microprocessor Unit, 400MHz, LCD, USB, LPDDR/DDR2/MLC NAND support, 217 Pins (refer to http://www.atmel.com/devices/SAM9N12.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long DBGU_IRQHandler - .long PIOA_IRQHandler - .long PIOC_IRQHandler - .long FUSE_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long TC0_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DMAC_IRQHandler - .long 0 - .long 0 - .long UDP_IRQHandler - .long 0 - .long LCDC_IRQHandler - .long 0 - .long 0 - .long SSC_IRQHandler - .long 0 - .long TRNG_IRQHandler - .long IRQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ DBGU_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOC_IRQHandler - IRQ FUSE_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ TC0_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UDP_IRQHandler - IRQ LCDC_IRQHandler - IRQ SSC_IRQHandler - IRQ TRNG_IRQHandler - IRQ IRQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/at91sam9x25.go b/device/sam/at91sam9x25.go index fed2fe4..c6ea582 100644 --- a/device/sam/at91sam9x25.go +++ b/device/sam/at91sam9x25.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -118,8 +118,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/at91sam9x25.s b/device/sam/at91sam9x25.s deleted file mode 100644 index bc2a519..0000000 --- a/device/sam/at91sam9x25.s +++ /dev/null @@ -1,129 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from AT91SAM9X25.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel AT91SAM9X25 device: ARM926EJ Embedded Microprocessor Unit, 400MHz, Dual Ethernet and CAN, HS USB, LPDDR/DDR2/MLC NAND support, 217 Pins (refer to http://www.atmel.com/devices/SAM9X25.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long DBGU_IRQHandler - .long PIOA_IRQHandler - .long PIOC_IRQHandler - .long SMD_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long TWI2_IRQHandler - .long HSMCI0_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long TC0_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DMAC0_IRQHandler - .long DMAC1_IRQHandler - .long 0 - .long UDPHS_IRQHandler - .long EMAC0_IRQHandler - .long 0 - .long HSMCI1_IRQHandler - .long EMAC1_IRQHandler - .long SSC_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - .long IRQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ DBGU_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOC_IRQHandler - IRQ SMD_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ TWI2_IRQHandler - IRQ HSMCI0_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ TC0_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC0_IRQHandler - IRQ DMAC1_IRQHandler - IRQ UDPHS_IRQHandler - IRQ EMAC0_IRQHandler - IRQ HSMCI1_IRQHandler - IRQ EMAC1_IRQHandler - IRQ SSC_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - IRQ IRQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/at91sam9x35.go b/device/sam/at91sam9x35.go index b1500cd..e59fff0 100644 --- a/device/sam/at91sam9x35.go +++ b/device/sam/at91sam9x35.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -115,8 +115,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/at91sam9x35.s b/device/sam/at91sam9x35.s deleted file mode 100644 index 0a81233..0000000 --- a/device/sam/at91sam9x35.s +++ /dev/null @@ -1,128 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from AT91SAM9X35.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel AT91SAM9X35 device: ARM926EJ Embedded Microprocessor Unit, 400MHz, LCD, Touchscreen, Ethernet, Dual CAN, HS USB, LPDDR/DDR2/MLC NAND support, 217 Pins (refer to http://www.atmel.com/devices/SAM9X35.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long DBGU_IRQHandler - .long PIOA_IRQHandler - .long PIOC_IRQHandler - .long SMD_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long TWI2_IRQHandler - .long HSMCI0_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long TC0_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DMAC0_IRQHandler - .long DMAC1_IRQHandler - .long 0 - .long UDPHS_IRQHandler - .long EMAC_IRQHandler - .long LCDC_IRQHandler - .long HSMCI1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - .long IRQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ DBGU_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOC_IRQHandler - IRQ SMD_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ TWI2_IRQHandler - IRQ HSMCI0_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ TC0_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC0_IRQHandler - IRQ DMAC1_IRQHandler - IRQ UDPHS_IRQHandler - IRQ EMAC_IRQHandler - IRQ LCDC_IRQHandler - IRQ HSMCI1_IRQHandler - IRQ SSC_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - IRQ IRQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3a4c.go b/device/sam/atsam3a4c.go index 0ee4de3..082c974 100644 --- a/device/sam/atsam3a4c.go +++ b/device/sam/atsam3a4c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -115,8 +115,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3a4c.s b/device/sam/atsam3a4c.s deleted file mode 100644 index 43352f6..0000000 --- a/device/sam/atsam3a4c.s +++ /dev/null @@ -1,140 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3A4C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3A4C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long EFC1_IRQHandler - .long UART_IRQHandler - .long 0 - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI0_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long 0 - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long DMAC_IRQHandler - .long UOTGHS_IRQHandler - .long TRNG_IRQHandler - .long 0 - .long CAN0_IRQHandler - .long CAN1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ EFC1_IRQHandler - IRQ UART_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UOTGHS_IRQHandler - IRQ TRNG_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3a8c.go b/device/sam/atsam3a8c.go index 5e1aa76..9da536e 100644 --- a/device/sam/atsam3a8c.go +++ b/device/sam/atsam3a8c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -115,8 +115,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3a8c.s b/device/sam/atsam3a8c.s deleted file mode 100644 index f1f8f1e..0000000 --- a/device/sam/atsam3a8c.s +++ /dev/null @@ -1,140 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3A8C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3A8C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long EFC1_IRQHandler - .long UART_IRQHandler - .long 0 - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI0_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long 0 - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long DMAC_IRQHandler - .long UOTGHS_IRQHandler - .long TRNG_IRQHandler - .long 0 - .long CAN0_IRQHandler - .long CAN1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ EFC1_IRQHandler - IRQ UART_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UOTGHS_IRQHandler - IRQ TRNG_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3n00a.go b/device/sam/atsam3n00a.go index 665e127..f33ace6 100644 --- a/device/sam/atsam3n00a.go +++ b/device/sam/atsam3n00a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -79,8 +79,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3n00a.s b/device/sam/atsam3n00a.s deleted file mode 100644 index 57a3ade..0000000 --- a/device/sam/atsam3n00a.s +++ /dev/null @@ -1,115 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3N00A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3N00A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3n00b.go b/device/sam/atsam3n00b.go index 2e3c6f7..b5c6e4d 100644 --- a/device/sam/atsam3n00b.go +++ b/device/sam/atsam3n00b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -82,8 +82,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3n00b.s b/device/sam/atsam3n00b.s deleted file mode 100644 index 9fd3714..0000000 --- a/device/sam/atsam3n00b.s +++ /dev/null @@ -1,116 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3N00B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3N00B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3n0a.go b/device/sam/atsam3n0a.go index ab8d781..0453b6c 100644 --- a/device/sam/atsam3n0a.go +++ b/device/sam/atsam3n0a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -79,8 +79,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3n0a.s b/device/sam/atsam3n0a.s deleted file mode 100644 index bde2714..0000000 --- a/device/sam/atsam3n0a.s +++ /dev/null @@ -1,115 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3N0A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3N0A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3n0b.go b/device/sam/atsam3n0b.go index 331fa3c..95808a0 100644 --- a/device/sam/atsam3n0b.go +++ b/device/sam/atsam3n0b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -82,8 +82,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3n0b.s b/device/sam/atsam3n0b.s deleted file mode 100644 index fe3fb2b..0000000 --- a/device/sam/atsam3n0b.s +++ /dev/null @@ -1,116 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3N0B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3N0B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3n0c.go b/device/sam/atsam3n0c.go index d6af7f9..3f4e910 100644 --- a/device/sam/atsam3n0c.go +++ b/device/sam/atsam3n0c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -94,8 +94,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3n0c.s b/device/sam/atsam3n0c.s deleted file mode 100644 index aea099a..0000000 --- a/device/sam/atsam3n0c.s +++ /dev/null @@ -1,120 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3N0C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3N0C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3n1a.go b/device/sam/atsam3n1a.go index 20f28e2..03b8506 100644 --- a/device/sam/atsam3n1a.go +++ b/device/sam/atsam3n1a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -79,8 +79,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3n1a.s b/device/sam/atsam3n1a.s deleted file mode 100644 index 2f75edc..0000000 --- a/device/sam/atsam3n1a.s +++ /dev/null @@ -1,115 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3N1A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3N1A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3n1b.go b/device/sam/atsam3n1b.go index 2d5d4d5..1502ceb 100644 --- a/device/sam/atsam3n1b.go +++ b/device/sam/atsam3n1b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -82,8 +82,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3n1b.s b/device/sam/atsam3n1b.s deleted file mode 100644 index 5f4806b..0000000 --- a/device/sam/atsam3n1b.s +++ /dev/null @@ -1,116 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3N1B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3N1B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3n1c.go b/device/sam/atsam3n1c.go index 76e57d4..6c0b35a 100644 --- a/device/sam/atsam3n1c.go +++ b/device/sam/atsam3n1c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -94,8 +94,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3n1c.s b/device/sam/atsam3n1c.s deleted file mode 100644 index 7af68d1..0000000 --- a/device/sam/atsam3n1c.s +++ /dev/null @@ -1,120 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3N1C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3N1C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3n2a.go b/device/sam/atsam3n2a.go index 90bd33b..9fb7396 100644 --- a/device/sam/atsam3n2a.go +++ b/device/sam/atsam3n2a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -79,8 +79,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3n2a.s b/device/sam/atsam3n2a.s deleted file mode 100644 index 0c4c950..0000000 --- a/device/sam/atsam3n2a.s +++ /dev/null @@ -1,115 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3N2A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3N2A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3n2b.go b/device/sam/atsam3n2b.go index 6756f40..ca957d6 100644 --- a/device/sam/atsam3n2b.go +++ b/device/sam/atsam3n2b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -82,8 +82,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3n2b.s b/device/sam/atsam3n2b.s deleted file mode 100644 index b02fdac..0000000 --- a/device/sam/atsam3n2b.s +++ /dev/null @@ -1,116 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3N2B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3N2B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3n2c.go b/device/sam/atsam3n2c.go index c3cdcd1..28f5164 100644 --- a/device/sam/atsam3n2c.go +++ b/device/sam/atsam3n2c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -94,8 +94,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3n2c.s b/device/sam/atsam3n2c.s deleted file mode 100644 index b0e68eb..0000000 --- a/device/sam/atsam3n2c.s +++ /dev/null @@ -1,120 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3N2C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3N2C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3n4a.go b/device/sam/atsam3n4a.go index 320a9ad..34eca98 100644 --- a/device/sam/atsam3n4a.go +++ b/device/sam/atsam3n4a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -79,8 +79,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3n4a.s b/device/sam/atsam3n4a.s deleted file mode 100644 index c315d54..0000000 --- a/device/sam/atsam3n4a.s +++ /dev/null @@ -1,115 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3N4A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3N4A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3n4b.go b/device/sam/atsam3n4b.go index 35ee314..75fe510 100644 --- a/device/sam/atsam3n4b.go +++ b/device/sam/atsam3n4b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -82,8 +82,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3n4b.s b/device/sam/atsam3n4b.s deleted file mode 100644 index ca40010..0000000 --- a/device/sam/atsam3n4b.s +++ /dev/null @@ -1,116 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3N4B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3N4B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3n4c.go b/device/sam/atsam3n4c.go index f473237..be08382 100644 --- a/device/sam/atsam3n4c.go +++ b/device/sam/atsam3n4c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -94,8 +94,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3n4c.s b/device/sam/atsam3n4c.s deleted file mode 100644 index a98f74c..0000000 --- a/device/sam/atsam3n4c.s +++ /dev/null @@ -1,120 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3N4C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3N4C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3s1a.go b/device/sam/atsam3s1a.go index 19e49ad..bd2125c 100644 --- a/device/sam/atsam3s1a.go +++ b/device/sam/atsam3s1a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -91,8 +91,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3s1a.s b/device/sam/atsam3s1a.s deleted file mode 100644 index 38010b8..0000000 --- a/device/sam/atsam3s1a.s +++ /dev/null @@ -1,122 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3S1A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3S1A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3s1b.go b/device/sam/atsam3s1b.go index 572bd25..7d403dd 100644 --- a/device/sam/atsam3s1b.go +++ b/device/sam/atsam3s1b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3s1b.s b/device/sam/atsam3s1b.s deleted file mode 100644 index 5ad973b..0000000 --- a/device/sam/atsam3s1b.s +++ /dev/null @@ -1,124 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3S1B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3S1B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3s1c.go b/device/sam/atsam3s1c.go index 85b6271..68d0d2b 100644 --- a/device/sam/atsam3s1c.go +++ b/device/sam/atsam3s1c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -109,8 +109,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3s1c.s b/device/sam/atsam3s1c.s deleted file mode 100644 index dae7912..0000000 --- a/device/sam/atsam3s1c.s +++ /dev/null @@ -1,128 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3S1C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3S1C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3s2a.go b/device/sam/atsam3s2a.go index 96c0ac8..9bd30da 100644 --- a/device/sam/atsam3s2a.go +++ b/device/sam/atsam3s2a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -91,8 +91,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3s2a.s b/device/sam/atsam3s2a.s deleted file mode 100644 index 22a3c05..0000000 --- a/device/sam/atsam3s2a.s +++ /dev/null @@ -1,122 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3S2A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3S2A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3s2b.go b/device/sam/atsam3s2b.go index 06691b1..7ef98fd 100644 --- a/device/sam/atsam3s2b.go +++ b/device/sam/atsam3s2b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3s2b.s b/device/sam/atsam3s2b.s deleted file mode 100644 index 9b67587..0000000 --- a/device/sam/atsam3s2b.s +++ /dev/null @@ -1,124 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3S2B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3S2B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3s2c.go b/device/sam/atsam3s2c.go index 7ba2344..cd62af9 100644 --- a/device/sam/atsam3s2c.go +++ b/device/sam/atsam3s2c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -109,8 +109,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3s2c.s b/device/sam/atsam3s2c.s deleted file mode 100644 index 7f93ef1..0000000 --- a/device/sam/atsam3s2c.s +++ /dev/null @@ -1,128 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3S2C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3S2C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3s4a.go b/device/sam/atsam3s4a.go index 7df18be..a5f1e50 100644 --- a/device/sam/atsam3s4a.go +++ b/device/sam/atsam3s4a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -91,8 +91,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3s4a.s b/device/sam/atsam3s4a.s deleted file mode 100644 index bea1250..0000000 --- a/device/sam/atsam3s4a.s +++ /dev/null @@ -1,122 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3S4A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3S4A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3s4b.go b/device/sam/atsam3s4b.go index 61ef2d0..f10f7ad 100644 --- a/device/sam/atsam3s4b.go +++ b/device/sam/atsam3s4b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3s4b.s b/device/sam/atsam3s4b.s deleted file mode 100644 index 7ac5343..0000000 --- a/device/sam/atsam3s4b.s +++ /dev/null @@ -1,124 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3S4B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3S4B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3s4c.go b/device/sam/atsam3s4c.go index 6a1e0f5..8b50c1b 100644 --- a/device/sam/atsam3s4c.go +++ b/device/sam/atsam3s4c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -109,8 +109,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3s4c.s b/device/sam/atsam3s4c.s deleted file mode 100644 index dbd5217..0000000 --- a/device/sam/atsam3s4c.s +++ /dev/null @@ -1,128 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3S4C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3S4C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3s8b.go b/device/sam/atsam3s8b.go index bea6d58..9674c9e 100644 --- a/device/sam/atsam3s8b.go +++ b/device/sam/atsam3s8b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3s8b.s b/device/sam/atsam3s8b.s deleted file mode 100644 index d3d92d4..0000000 --- a/device/sam/atsam3s8b.s +++ /dev/null @@ -1,124 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3S8B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3S8B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3s8c.go b/device/sam/atsam3s8c.go index 8c88dfc..071da83 100644 --- a/device/sam/atsam3s8c.go +++ b/device/sam/atsam3s8c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -112,8 +112,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3s8c.s b/device/sam/atsam3s8c.s deleted file mode 100644 index 87687d1..0000000 --- a/device/sam/atsam3s8c.s +++ /dev/null @@ -1,129 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3S8C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3S8C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3sd8b.go b/device/sam/atsam3sd8b.go index 5a3c71a..a3262cb 100644 --- a/device/sam/atsam3sd8b.go +++ b/device/sam/atsam3sd8b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3sd8b.s b/device/sam/atsam3sd8b.s deleted file mode 100644 index 7a3ab8c..0000000 --- a/device/sam/atsam3sd8b.s +++ /dev/null @@ -1,124 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3SD8B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3SD8B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3sd8c.go b/device/sam/atsam3sd8c.go index 0b1fea1..24a0f97 100644 --- a/device/sam/atsam3sd8c.go +++ b/device/sam/atsam3sd8c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -112,8 +112,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3sd8c.s b/device/sam/atsam3sd8c.s deleted file mode 100644 index 9b8e826..0000000 --- a/device/sam/atsam3sd8c.s +++ /dev/null @@ -1,129 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3SD8C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3SD8C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3u1c.go b/device/sam/atsam3u1c.go index e501e47..d932799 100644 --- a/device/sam/atsam3u1c.go +++ b/device/sam/atsam3u1c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -94,8 +94,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3u1c.s b/device/sam/atsam3u1c.s deleted file mode 100644 index 3c45b54..0000000 --- a/device/sam/atsam3u1c.s +++ /dev/null @@ -1,118 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3U1C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3U1C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long PWM_IRQHandler - .long ADC12B_IRQHandler - .long ADC_IRQHandler - .long DMAC_IRQHandler - .long UDPHS_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC12B_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UDPHS_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3u1e.go b/device/sam/atsam3u1e.go index 7c2739d..e0ab415 100644 --- a/device/sam/atsam3u1e.go +++ b/device/sam/atsam3u1e.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -100,8 +100,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3u1e.s b/device/sam/atsam3u1e.s deleted file mode 100644 index ece584b..0000000 --- a/device/sam/atsam3u1e.s +++ /dev/null @@ -1,120 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3U1E.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3U1E Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long PWM_IRQHandler - .long ADC12B_IRQHandler - .long ADC_IRQHandler - .long DMAC_IRQHandler - .long UDPHS_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC12B_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UDPHS_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3u2c.go b/device/sam/atsam3u2c.go index b3f3dd5..fb13d4e 100644 --- a/device/sam/atsam3u2c.go +++ b/device/sam/atsam3u2c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -94,8 +94,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3u2c.s b/device/sam/atsam3u2c.s deleted file mode 100644 index 6dcfdf7..0000000 --- a/device/sam/atsam3u2c.s +++ /dev/null @@ -1,118 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3U2C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3U2C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long PWM_IRQHandler - .long ADC12B_IRQHandler - .long ADC_IRQHandler - .long DMAC_IRQHandler - .long UDPHS_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC12B_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UDPHS_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3u2e.go b/device/sam/atsam3u2e.go index c0b7a25..681cf01 100644 --- a/device/sam/atsam3u2e.go +++ b/device/sam/atsam3u2e.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -100,8 +100,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3u2e.s b/device/sam/atsam3u2e.s deleted file mode 100644 index 23f0519..0000000 --- a/device/sam/atsam3u2e.s +++ /dev/null @@ -1,120 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3U2E.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3U2E Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long PWM_IRQHandler - .long ADC12B_IRQHandler - .long ADC_IRQHandler - .long DMAC_IRQHandler - .long UDPHS_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC12B_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UDPHS_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3u4c.go b/device/sam/atsam3u4c.go index 3f66feb..7fb2e1c 100644 --- a/device/sam/atsam3u4c.go +++ b/device/sam/atsam3u4c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3u4c.s b/device/sam/atsam3u4c.s deleted file mode 100644 index 1935c28..0000000 --- a/device/sam/atsam3u4c.s +++ /dev/null @@ -1,119 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3U4C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3U4C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long EFC1_IRQHandler - .long UART_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long PWM_IRQHandler - .long ADC12B_IRQHandler - .long ADC_IRQHandler - .long DMAC_IRQHandler - .long UDPHS_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ EFC1_IRQHandler - IRQ UART_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC12B_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UDPHS_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3u4e.go b/device/sam/atsam3u4e.go index d50cf44..0d31159 100644 --- a/device/sam/atsam3u4e.go +++ b/device/sam/atsam3u4e.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -103,8 +103,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3u4e.s b/device/sam/atsam3u4e.s deleted file mode 100644 index ce48625..0000000 --- a/device/sam/atsam3u4e.s +++ /dev/null @@ -1,121 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3U4E.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3U4E Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long EFC1_IRQHandler - .long UART_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long PWM_IRQHandler - .long ADC12B_IRQHandler - .long ADC_IRQHandler - .long DMAC_IRQHandler - .long UDPHS_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ EFC1_IRQHandler - IRQ UART_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC12B_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UDPHS_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3x4c.go b/device/sam/atsam3x4c.go index 8d842a3..55b393e 100644 --- a/device/sam/atsam3x4c.go +++ b/device/sam/atsam3x4c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -118,8 +118,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3x4c.s b/device/sam/atsam3x4c.s deleted file mode 100644 index 898cb45..0000000 --- a/device/sam/atsam3x4c.s +++ /dev/null @@ -1,141 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3X4C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3X4C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long EFC1_IRQHandler - .long UART_IRQHandler - .long 0 - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI0_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long 0 - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long DMAC_IRQHandler - .long UOTGHS_IRQHandler - .long TRNG_IRQHandler - .long EMAC_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ EFC1_IRQHandler - IRQ UART_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UOTGHS_IRQHandler - IRQ TRNG_IRQHandler - IRQ EMAC_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3x4e.go b/device/sam/atsam3x4e.go index ff53475..f10e799 100644 --- a/device/sam/atsam3x4e.go +++ b/device/sam/atsam3x4e.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -136,8 +136,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3x4e.s b/device/sam/atsam3x4e.s deleted file mode 100644 index 0a9ad29..0000000 --- a/device/sam/atsam3x4e.s +++ /dev/null @@ -1,147 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3X4E.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3X4E Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long EFC1_IRQHandler - .long UART_IRQHandler - .long 0 - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI0_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long DMAC_IRQHandler - .long UOTGHS_IRQHandler - .long TRNG_IRQHandler - .long EMAC_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ EFC1_IRQHandler - IRQ UART_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ PIOD_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UOTGHS_IRQHandler - IRQ TRNG_IRQHandler - IRQ EMAC_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3x8c.go b/device/sam/atsam3x8c.go index ad0bb67..3ee1eba 100644 --- a/device/sam/atsam3x8c.go +++ b/device/sam/atsam3x8c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -118,8 +118,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3x8c.s b/device/sam/atsam3x8c.s deleted file mode 100644 index 50ef538..0000000 --- a/device/sam/atsam3x8c.s +++ /dev/null @@ -1,141 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3X8C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3X8C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long EFC1_IRQHandler - .long UART_IRQHandler - .long 0 - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI0_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long 0 - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long DMAC_IRQHandler - .long UOTGHS_IRQHandler - .long TRNG_IRQHandler - .long EMAC_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ EFC1_IRQHandler - IRQ UART_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UOTGHS_IRQHandler - IRQ TRNG_IRQHandler - IRQ EMAC_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3x8e.go b/device/sam/atsam3x8e.go index 24c9a55..fdcbe39 100644 --- a/device/sam/atsam3x8e.go +++ b/device/sam/atsam3x8e.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -136,8 +136,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3x8e.s b/device/sam/atsam3x8e.s deleted file mode 100644 index 1135079..0000000 --- a/device/sam/atsam3x8e.s +++ /dev/null @@ -1,147 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3X8E.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3X8E Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long EFC1_IRQHandler - .long UART_IRQHandler - .long 0 - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI0_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long DMAC_IRQHandler - .long UOTGHS_IRQHandler - .long TRNG_IRQHandler - .long EMAC_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ EFC1_IRQHandler - IRQ UART_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ PIOD_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UOTGHS_IRQHandler - IRQ TRNG_IRQHandler - IRQ EMAC_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam3x8h.go b/device/sam/atsam3x8h.go index 5ff9240..a38bc2c 100644 --- a/device/sam/atsam3x8h.go +++ b/device/sam/atsam3x8h.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -148,8 +148,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam3x8h.s b/device/sam/atsam3x8h.s deleted file mode 100644 index 8f28da6..0000000 --- a/device/sam/atsam3x8h.s +++ /dev/null @@ -1,151 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM3X8H.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM3X8H Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long EFC1_IRQHandler - .long UART_IRQHandler - .long 0 - .long SDRAMC_IRQHandler - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long PIOF_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long DMAC_IRQHandler - .long UOTGHS_IRQHandler - .long TRNG_IRQHandler - .long EMAC_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ EFC1_IRQHandler - IRQ UART_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ PIOF_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ DMAC_IRQHandler - IRQ UOTGHS_IRQHandler - IRQ TRNG_IRQHandler - IRQ EMAC_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4s16b.go b/device/sam/atsam4s16b.go index 39ac44c..d2361d0 100644 --- a/device/sam/atsam4s16b.go +++ b/device/sam/atsam4s16b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4s16b.s b/device/sam/atsam4s16b.s deleted file mode 100644 index 1190d21..0000000 --- a/device/sam/atsam4s16b.s +++ /dev/null @@ -1,124 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4S16B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4S16B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4s16c.go b/device/sam/atsam4s16c.go index df84205..c66004e 100644 --- a/device/sam/atsam4s16c.go +++ b/device/sam/atsam4s16c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -109,8 +109,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4s16c.s b/device/sam/atsam4s16c.s deleted file mode 100644 index c4ef7f8..0000000 --- a/device/sam/atsam4s16c.s +++ /dev/null @@ -1,128 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4S16C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4S16C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4s2a.go b/device/sam/atsam4s2a.go index 218c418..392d318 100644 --- a/device/sam/atsam4s2a.go +++ b/device/sam/atsam4s2a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -88,8 +88,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4s2a.s b/device/sam/atsam4s2a.s deleted file mode 100644 index 31172ee..0000000 --- a/device/sam/atsam4s2a.s +++ /dev/null @@ -1,121 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4S2A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4S2A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long 0 - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4s2b.go b/device/sam/atsam4s2b.go index 27a09fb..dbf94ee 100644 --- a/device/sam/atsam4s2b.go +++ b/device/sam/atsam4s2b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4s2b.s b/device/sam/atsam4s2b.s deleted file mode 100644 index b3e17c2..0000000 --- a/device/sam/atsam4s2b.s +++ /dev/null @@ -1,124 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4S2B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4S2B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4s2c.go b/device/sam/atsam4s2c.go index 87ffae4..b018fa2 100644 --- a/device/sam/atsam4s2c.go +++ b/device/sam/atsam4s2c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -109,8 +109,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4s2c.s b/device/sam/atsam4s2c.s deleted file mode 100644 index 6f66fdc..0000000 --- a/device/sam/atsam4s2c.s +++ /dev/null @@ -1,128 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4S2C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4S2C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4s4a.go b/device/sam/atsam4s4a.go index 41eafa9..b010b3f 100644 --- a/device/sam/atsam4s4a.go +++ b/device/sam/atsam4s4a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -88,8 +88,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4s4a.s b/device/sam/atsam4s4a.s deleted file mode 100644 index a98383b..0000000 --- a/device/sam/atsam4s4a.s +++ /dev/null @@ -1,121 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4S4A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4S4A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long 0 - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4s4b.go b/device/sam/atsam4s4b.go index 3ecf13b..9e38a4d 100644 --- a/device/sam/atsam4s4b.go +++ b/device/sam/atsam4s4b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4s4b.s b/device/sam/atsam4s4b.s deleted file mode 100644 index 36a8ce1..0000000 --- a/device/sam/atsam4s4b.s +++ /dev/null @@ -1,124 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4S4B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4S4B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4s4c.go b/device/sam/atsam4s4c.go index c204cf0..f12b0f8 100644 --- a/device/sam/atsam4s4c.go +++ b/device/sam/atsam4s4c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -109,8 +109,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4s4c.s b/device/sam/atsam4s4c.s deleted file mode 100644 index 90cff01..0000000 --- a/device/sam/atsam4s4c.s +++ /dev/null @@ -1,128 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4S4C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4S4C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4s8b.go b/device/sam/atsam4s8b.go index a3b554f..acefe36 100644 --- a/device/sam/atsam4s8b.go +++ b/device/sam/atsam4s8b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4s8b.s b/device/sam/atsam4s8b.s deleted file mode 100644 index e713b14..0000000 --- a/device/sam/atsam4s8b.s +++ /dev/null @@ -1,124 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4S8B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4S8B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4s8c.go b/device/sam/atsam4s8c.go index d05506a..4379644 100644 --- a/device/sam/atsam4s8c.go +++ b/device/sam/atsam4s8c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -109,8 +109,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4s8c.s b/device/sam/atsam4s8c.s deleted file mode 100644 index 170ed17..0000000 --- a/device/sam/atsam4s8c.s +++ /dev/null @@ -1,128 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4S8C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4S8C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4sa16b.go b/device/sam/atsam4sa16b.go index 8717d1e..8bf409e 100644 --- a/device/sam/atsam4sa16b.go +++ b/device/sam/atsam4sa16b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -97,8 +97,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4sa16b.s b/device/sam/atsam4sa16b.s deleted file mode 100644 index abd7170..0000000 --- a/device/sam/atsam4sa16b.s +++ /dev/null @@ -1,124 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4SA16B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4SA16B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4sa16c.go b/device/sam/atsam4sa16c.go index 50f5cae..2521015 100644 --- a/device/sam/atsam4sa16c.go +++ b/device/sam/atsam4sa16c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -109,8 +109,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4sa16c.s b/device/sam/atsam4sa16c.s deleted file mode 100644 index bf7ddf1..0000000 --- a/device/sam/atsam4sa16c.s +++ /dev/null @@ -1,128 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4SA16C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4SA16C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long 0 - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4sd16b.go b/device/sam/atsam4sd16b.go index 9c4b23f..4542d45 100644 --- a/device/sam/atsam4sd16b.go +++ b/device/sam/atsam4sd16b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -100,8 +100,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4sd16b.s b/device/sam/atsam4sd16b.s deleted file mode 100644 index f8970e4..0000000 --- a/device/sam/atsam4sd16b.s +++ /dev/null @@ -1,125 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4SD16B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4SD16B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long EFC1_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ EFC1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4sd16c.go b/device/sam/atsam4sd16c.go index 1a787cb..86b5f47 100644 --- a/device/sam/atsam4sd16c.go +++ b/device/sam/atsam4sd16c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -112,8 +112,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4sd16c.s b/device/sam/atsam4sd16c.s deleted file mode 100644 index f1b388d..0000000 --- a/device/sam/atsam4sd16c.s +++ /dev/null @@ -1,129 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4SD16C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4SD16C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long EFC1_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ EFC1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4sd32b.go b/device/sam/atsam4sd32b.go index cb0b1e3..94636c4 100644 --- a/device/sam/atsam4sd32b.go +++ b/device/sam/atsam4sd32b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -100,8 +100,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4sd32b.s b/device/sam/atsam4sd32b.s deleted file mode 100644 index 6a6c449..0000000 --- a/device/sam/atsam4sd32b.s +++ /dev/null @@ -1,125 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4SD32B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4SD32B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long EFC1_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ EFC1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4sd32c.go b/device/sam/atsam4sd32c.go index 7b9f3bc..b89d6f2 100644 --- a/device/sam/atsam4sd32c.go +++ b/device/sam/atsam4sd32c.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -112,8 +112,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4sd32c.s b/device/sam/atsam4sd32c.s deleted file mode 100644 index 81711aa..0000000 --- a/device/sam/atsam4sd32c.s +++ /dev/null @@ -1,129 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4SD32C.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4SD32C Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long EFC1_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long HSMCI_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long SPI_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ EFC1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ SPI_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsam4sp32a.go b/device/sam/atsam4sp32a.go index dbcdff6..cae8d5e 100644 --- a/device/sam/atsam4sp32a.go +++ b/device/sam/atsam4sp32a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -109,8 +109,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PMC_IRQHandler func interruptPMC() { diff --git a/device/sam/atsam4sp32a.s b/device/sam/atsam4sp32a.s deleted file mode 100644 index 17b81fc..0000000 --- a/device/sam/atsam4sp32a.s +++ /dev/null @@ -1,128 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAM4SP32A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAM4SP32A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long PMC_IRQHandler - .long EFC0_IRQHandler - .long EFC1_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long PPLC_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long ADC_IRQHandler - .long DACC_IRQHandler - .long PWM_IRQHandler - .long CRCCU_IRQHandler - .long ACC_IRQHandler - .long UDP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PMC_IRQHandler - IRQ EFC0_IRQHandler - IRQ EFC1_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ PPLC_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM_IRQHandler - IRQ CRCCU_IRQHandler - IRQ ACC_IRQHandler - IRQ UDP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsama5d31.go b/device/sam/atsama5d31.go index 253c1bf..fac1af5 100644 --- a/device/sam/atsama5d31.go +++ b/device/sam/atsama5d31.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -142,8 +142,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/atsama5d31.s b/device/sam/atsama5d31.s deleted file mode 100644 index cc1bbcb..0000000 --- a/device/sam/atsama5d31.s +++ /dev/null @@ -1,154 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMA5D31.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAMA5D31 device: ARM Cortex-A5 processor-based embedded MPU, 536MHz, Linux support, FPU, LCD controller, 10/100 Ethernet, security (refer to http://www.atmel.com/devices/SAMA5D31.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long PMC_IRQHandler - .long DBGU_IRQHandler - .long 0 - .long 0 - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long SMD_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long TWI2_IRQHandler - .long HSMCI0_IRQHandler - .long HSMCI1_IRQHandler - .long HSMCI2_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DMAC0_IRQHandler - .long DMAC1_IRQHandler - .long 0 - .long UDPHS_IRQHandler - .long 0 - .long EMAC_IRQHandler - .long LCDC_IRQHandler - .long ISI_IRQHandler - .long SSC0_IRQHandler - .long SSC1_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long TRNG_IRQHandler - .long 0 - .long IRQ_IRQHandler - .long FUSE_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ PMC_IRQHandler - IRQ DBGU_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ SMD_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ TWI2_IRQHandler - IRQ HSMCI0_IRQHandler - IRQ HSMCI1_IRQHandler - IRQ HSMCI2_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC0_IRQHandler - IRQ DMAC1_IRQHandler - IRQ UDPHS_IRQHandler - IRQ EMAC_IRQHandler - IRQ LCDC_IRQHandler - IRQ ISI_IRQHandler - IRQ SSC0_IRQHandler - IRQ SSC1_IRQHandler - IRQ TRNG_IRQHandler - IRQ IRQ_IRQHandler - IRQ FUSE_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsama5d33.go b/device/sam/atsama5d33.go index 02bd057..c6aec89 100644 --- a/device/sam/atsama5d33.go +++ b/device/sam/atsama5d33.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -133,8 +133,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/atsama5d33.s b/device/sam/atsama5d33.s deleted file mode 100644 index efaca5c..0000000 --- a/device/sam/atsama5d33.s +++ /dev/null @@ -1,151 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMA5D33.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAMA5D33 device: ARM Cortex-A5 processor-based embedded MPU, 536MHz, Linux support, FPU, LCD controller, gigabit Ethernet, security (refer to http://www.atmel.com/devices/SAMA5D33.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long PMC_IRQHandler - .long DBGU_IRQHandler - .long 0 - .long 0 - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long SMD_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long TWI2_IRQHandler - .long HSMCI0_IRQHandler - .long HSMCI1_IRQHandler - .long 0 - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DMAC0_IRQHandler - .long DMAC1_IRQHandler - .long 0 - .long UDPHS_IRQHandler - .long GMAC_IRQHandler - .long 0 - .long LCDC_IRQHandler - .long ISI_IRQHandler - .long SSC0_IRQHandler - .long SSC1_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long TRNG_IRQHandler - .long 0 - .long IRQ_IRQHandler - .long FUSE_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ PMC_IRQHandler - IRQ DBGU_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ SMD_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ TWI2_IRQHandler - IRQ HSMCI0_IRQHandler - IRQ HSMCI1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC0_IRQHandler - IRQ DMAC1_IRQHandler - IRQ UDPHS_IRQHandler - IRQ GMAC_IRQHandler - IRQ LCDC_IRQHandler - IRQ ISI_IRQHandler - IRQ SSC0_IRQHandler - IRQ SSC1_IRQHandler - IRQ TRNG_IRQHandler - IRQ IRQ_IRQHandler - IRQ FUSE_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsama5d34.go b/device/sam/atsama5d34.go index 74d05a3..45ac46d 100644 --- a/device/sam/atsama5d34.go +++ b/device/sam/atsama5d34.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -142,8 +142,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/atsama5d34.s b/device/sam/atsama5d34.s deleted file mode 100644 index a732e87..0000000 --- a/device/sam/atsama5d34.s +++ /dev/null @@ -1,154 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMA5D34.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAMA5D34 device: ARM Cortex-A5 processor-based embedded MPU, 536MHz, Linux support, FPU, LCD controller, gigabit Ethernet, dual CAN, security (refer to http://www.atmel.com/devices/SAMA5D34.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long PMC_IRQHandler - .long DBGU_IRQHandler - .long 0 - .long 0 - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long SMD_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long 0 - .long 0 - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long TWI2_IRQHandler - .long HSMCI0_IRQHandler - .long HSMCI1_IRQHandler - .long HSMCI2_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DMAC0_IRQHandler - .long DMAC1_IRQHandler - .long 0 - .long UDPHS_IRQHandler - .long GMAC_IRQHandler - .long 0 - .long LCDC_IRQHandler - .long ISI_IRQHandler - .long SSC0_IRQHandler - .long SSC1_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - .long 0 - .long 0 - .long 0 - .long TRNG_IRQHandler - .long 0 - .long IRQ_IRQHandler - .long FUSE_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ PMC_IRQHandler - IRQ DBGU_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ SMD_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ TWI2_IRQHandler - IRQ HSMCI0_IRQHandler - IRQ HSMCI1_IRQHandler - IRQ HSMCI2_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC0_IRQHandler - IRQ DMAC1_IRQHandler - IRQ UDPHS_IRQHandler - IRQ GMAC_IRQHandler - IRQ LCDC_IRQHandler - IRQ ISI_IRQHandler - IRQ SSC0_IRQHandler - IRQ SSC1_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - IRQ TRNG_IRQHandler - IRQ IRQ_IRQHandler - IRQ FUSE_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsama5d35.go b/device/sam/atsama5d35.go index 2b11ab0..20bb818 100644 --- a/device/sam/atsama5d35.go +++ b/device/sam/atsama5d35.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -148,8 +148,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export FIQ_IRQHandler func interruptFIQ() { diff --git a/device/sam/atsama5d35.s b/device/sam/atsama5d35.s deleted file mode 100644 index 71e9246..0000000 --- a/device/sam/atsama5d35.s +++ /dev/null @@ -1,156 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMA5D35.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAMA5D35 device: ARM Cortex-A5 processor-based embedded MPU, 536MHz, Linux support, FPU, dual Ethernet, dual CAN, security (refer to http://www.atmel.com/devices/SAMA5D35.aspx for more) -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long FIQ_IRQHandler - .long PMC_IRQHandler - .long DBGU_IRQHandler - .long 0 - .long 0 - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long SMD_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long TWI0_IRQHandler - .long TWI1_IRQHandler - .long TWI2_IRQHandler - .long HSMCI0_IRQHandler - .long HSMCI1_IRQHandler - .long HSMCI2_IRQHandler - .long SPI0_IRQHandler - .long SPI1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long PWM_IRQHandler - .long ADC_IRQHandler - .long DMAC0_IRQHandler - .long DMAC1_IRQHandler - .long 0 - .long UDPHS_IRQHandler - .long GMAC_IRQHandler - .long EMAC_IRQHandler - .long 0 - .long ISI_IRQHandler - .long SSC0_IRQHandler - .long SSC1_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - .long 0 - .long 0 - .long 0 - .long TRNG_IRQHandler - .long 0 - .long IRQ_IRQHandler - .long FUSE_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ FIQ_IRQHandler - IRQ PMC_IRQHandler - IRQ DBGU_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ SMD_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ TWI0_IRQHandler - IRQ TWI1_IRQHandler - IRQ TWI2_IRQHandler - IRQ HSMCI0_IRQHandler - IRQ HSMCI1_IRQHandler - IRQ HSMCI2_IRQHandler - IRQ SPI0_IRQHandler - IRQ SPI1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ PWM_IRQHandler - IRQ ADC_IRQHandler - IRQ DMAC0_IRQHandler - IRQ DMAC1_IRQHandler - IRQ UDPHS_IRQHandler - IRQ GMAC_IRQHandler - IRQ EMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ SSC0_IRQHandler - IRQ SSC1_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - IRQ TRNG_IRQHandler - IRQ IRQ_IRQHandler - IRQ FUSE_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e15a.go b/device/sam/atsamd21e15a.go index fe71dc5..21b72f4 100644 --- a/device/sam/atsamd21e15a.go +++ b/device/sam/atsamd21e15a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e15a.s b/device/sam/atsamd21e15a.s deleted file mode 100644 index bfb436e..0000000 --- a/device/sam/atsamd21e15a.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E15A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E15A device: Cortex-M0+ Microcontroller with 32KB Flash, 4KB SRAM, 32-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e15b.go b/device/sam/atsamd21e15b.go index 05d8cb6..adac1d9 100644 --- a/device/sam/atsamd21e15b.go +++ b/device/sam/atsamd21e15b.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e15b.s b/device/sam/atsamd21e15b.s deleted file mode 100644 index 65b6903..0000000 --- a/device/sam/atsamd21e15b.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E15B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E15B device: Cortex-M0+ Microcontroller with 32KB Flash, 4KB SRAM, 32-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e15bu.go b/device/sam/atsamd21e15bu.go index 2356b5d..d6cf3c4 100644 --- a/device/sam/atsamd21e15bu.go +++ b/device/sam/atsamd21e15bu.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e15bu.s b/device/sam/atsamd21e15bu.s deleted file mode 100644 index bb4612e..0000000 --- a/device/sam/atsamd21e15bu.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E15BU.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E15BU device: Cortex-M0+ Microcontroller with 32KB Flash, 4KB SRAM, 35-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e15cu.go b/device/sam/atsamd21e15cu.go index df8abca..96eb222 100644 --- a/device/sam/atsamd21e15cu.go +++ b/device/sam/atsamd21e15cu.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e15cu.s b/device/sam/atsamd21e15cu.s deleted file mode 100644 index 7be5612..0000000 --- a/device/sam/atsamd21e15cu.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E15CU.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E15CU device: Cortex-M0+ Microcontroller with 32KB Flash, 4KB SRAM, 35-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e15l.go b/device/sam/atsamd21e15l.go index ffaa41b..8c49f4f 100644 --- a/device/sam/atsamd21e15l.go +++ b/device/sam/atsamd21e15l.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -111,8 +111,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e15l.s b/device/sam/atsamd21e15l.s deleted file mode 100644 index ff7b415..0000000 --- a/device/sam/atsamd21e15l.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E15L.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E15L device: Cortex-M0+ Microcontroller with 32KB Flash, 4KB SRAM, QFN32_LIGHTING-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long 0 - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long 0 - .long AC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ AC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e16a.go b/device/sam/atsamd21e16a.go index ebb4545..77f328c 100644 --- a/device/sam/atsamd21e16a.go +++ b/device/sam/atsamd21e16a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e16a.s b/device/sam/atsamd21e16a.s deleted file mode 100644 index 4dde327..0000000 --- a/device/sam/atsamd21e16a.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E16A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E16A device: Cortex-M0+ Microcontroller with 64KB Flash, 8KB SRAM, 32-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e16b.go b/device/sam/atsamd21e16b.go index 097796b..4d5f485 100644 --- a/device/sam/atsamd21e16b.go +++ b/device/sam/atsamd21e16b.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e16b.s b/device/sam/atsamd21e16b.s deleted file mode 100644 index abab0b9..0000000 --- a/device/sam/atsamd21e16b.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E16B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E16B device: Cortex-M0+ Microcontroller with 64KB Flash, 8KB SRAM, 32-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e16bu.go b/device/sam/atsamd21e16bu.go index 12f7cf2..c31654f 100644 --- a/device/sam/atsamd21e16bu.go +++ b/device/sam/atsamd21e16bu.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e16bu.s b/device/sam/atsamd21e16bu.s deleted file mode 100644 index ba98344..0000000 --- a/device/sam/atsamd21e16bu.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E16BU.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E16BU device: Cortex-M0+ Microcontroller with 64KB Flash, 8KB SRAM, 35-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e16cu.go b/device/sam/atsamd21e16cu.go index e6bafe7..f9e0dd2 100644 --- a/device/sam/atsamd21e16cu.go +++ b/device/sam/atsamd21e16cu.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e16cu.s b/device/sam/atsamd21e16cu.s deleted file mode 100644 index d181fa2..0000000 --- a/device/sam/atsamd21e16cu.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E16CU.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E16CU device: Cortex-M0+ Microcontroller with 64KB Flash, 8KB SRAM, 35-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e16l.go b/device/sam/atsamd21e16l.go index 913841a..0fb8ff1 100644 --- a/device/sam/atsamd21e16l.go +++ b/device/sam/atsamd21e16l.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -111,8 +111,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e16l.s b/device/sam/atsamd21e16l.s deleted file mode 100644 index f467050..0000000 --- a/device/sam/atsamd21e16l.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E16L.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E16L device: Cortex-M0+ Microcontroller with 64KB Flash, 8KB SRAM, QFN32_LIGHTING-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long 0 - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long 0 - .long AC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ AC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e17a.go b/device/sam/atsamd21e17a.go index c744494..83cb1eb 100644 --- a/device/sam/atsamd21e17a.go +++ b/device/sam/atsamd21e17a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e17a.s b/device/sam/atsamd21e17a.s deleted file mode 100644 index a853752..0000000 --- a/device/sam/atsamd21e17a.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E17A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E17A device: Cortex-M0+ Microcontroller with 128KB Flash, 16KB SRAM, 32-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e17d.go b/device/sam/atsamd21e17d.go index aa918a7..5f05966 100644 --- a/device/sam/atsamd21e17d.go +++ b/device/sam/atsamd21e17d.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -117,8 +117,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e17d.s b/device/sam/atsamd21e17d.s deleted file mode 100644 index 79438ab..0000000 --- a/device/sam/atsamd21e17d.s +++ /dev/null @@ -1,135 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E17D.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E17D device: Cortex-M0+ Microcontroller with 128KB Flash, 16KB SRAM, 32-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - .long 0 - .long TCC3_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - IRQ TCC3_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e17du.go b/device/sam/atsamd21e17du.go index 972f406..7cb4049 100644 --- a/device/sam/atsamd21e17du.go +++ b/device/sam/atsamd21e17du.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -117,8 +117,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e17du.s b/device/sam/atsamd21e17du.s deleted file mode 100644 index b302e82..0000000 --- a/device/sam/atsamd21e17du.s +++ /dev/null @@ -1,135 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E17DU.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E17DU device: Cortex-M0+ Microcontroller with 128KB Flash, 16KB SRAM, 35-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - .long 0 - .long TCC3_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - IRQ TCC3_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e17l.go b/device/sam/atsamd21e17l.go index e3d36de..156b751 100644 --- a/device/sam/atsamd21e17l.go +++ b/device/sam/atsamd21e17l.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e17l.s b/device/sam/atsamd21e17l.s deleted file mode 100644 index c6b806d..0000000 --- a/device/sam/atsamd21e17l.s +++ /dev/null @@ -1,134 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E17L.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E17L device: Cortex-M0+ Microcontroller with 128KB Flash, 16KB SRAM, QFN32_LIGHTING-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long 0 - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long 0 - .long AC1_IRQHandler - .long TCC3_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ AC1_IRQHandler - IRQ TCC3_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21e18a.go b/device/sam/atsamd21e18a.go index f3b0bbf..0e05576 100644 --- a/device/sam/atsamd21e18a.go +++ b/device/sam/atsamd21e18a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21e18a.s b/device/sam/atsamd21e18a.s deleted file mode 100644 index 866373c..0000000 --- a/device/sam/atsamd21e18a.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21E18A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21E18A device: Cortex-M0+ Microcontroller with 256KB Flash, 32KB SRAM, 32-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21g15a.go b/device/sam/atsamd21g15a.go index 3a67cec..a308dca 100644 --- a/device/sam/atsamd21g15a.go +++ b/device/sam/atsamd21g15a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -120,8 +120,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21g15a.s b/device/sam/atsamd21g15a.s deleted file mode 100644 index 7d882af..0000000 --- a/device/sam/atsamd21g15a.s +++ /dev/null @@ -1,134 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21G15A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21G15A device: Cortex-M0+ Microcontroller with 32KB Flash, 4KB SRAM, 48-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21g15b.go b/device/sam/atsamd21g15b.go index 8482971..3280a6e 100644 --- a/device/sam/atsamd21g15b.go +++ b/device/sam/atsamd21g15b.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -120,8 +120,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21g15b.s b/device/sam/atsamd21g15b.s deleted file mode 100644 index a4a1217..0000000 --- a/device/sam/atsamd21g15b.s +++ /dev/null @@ -1,134 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21G15B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21G15B device: Cortex-M0+ Microcontroller with 32KB Flash, 4KB SRAM, 48-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21g15l.go b/device/sam/atsamd21g15l.go index ea6c111..dc89cd6 100644 --- a/device/sam/atsamd21g15l.go +++ b/device/sam/atsamd21g15l.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -123,8 +123,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21g15l.s b/device/sam/atsamd21g15l.s deleted file mode 100644 index 8612315..0000000 --- a/device/sam/atsamd21g15l.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21G15L.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21G15L device: Cortex-M0+ Microcontroller with 32KB Flash, 4KB SRAM, QFN48_LIGHTING-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long 0 - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long 0 - .long AC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ AC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21g16a.go b/device/sam/atsamd21g16a.go index 56adbb1..0429942 100644 --- a/device/sam/atsamd21g16a.go +++ b/device/sam/atsamd21g16a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -120,8 +120,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21g16a.s b/device/sam/atsamd21g16a.s deleted file mode 100644 index 3d0a467..0000000 --- a/device/sam/atsamd21g16a.s +++ /dev/null @@ -1,134 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21G16A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21G16A device: Cortex-M0+ Microcontroller with 64KB Flash, 8KB SRAM, 48-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21g16b.go b/device/sam/atsamd21g16b.go index ad81dc2..b1b8654 100644 --- a/device/sam/atsamd21g16b.go +++ b/device/sam/atsamd21g16b.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -120,8 +120,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21g16b.s b/device/sam/atsamd21g16b.s deleted file mode 100644 index 1b9067b..0000000 --- a/device/sam/atsamd21g16b.s +++ /dev/null @@ -1,134 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21G16B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21G16B device: Cortex-M0+ Microcontroller with 64KB Flash, 8KB SRAM, 48-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21g16l.go b/device/sam/atsamd21g16l.go index cc46802..39cd8ca 100644 --- a/device/sam/atsamd21g16l.go +++ b/device/sam/atsamd21g16l.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -123,8 +123,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21g16l.s b/device/sam/atsamd21g16l.s deleted file mode 100644 index e5b6da0..0000000 --- a/device/sam/atsamd21g16l.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21G16L.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21G16L device: Cortex-M0+ Microcontroller with 64KB Flash, 8KB SRAM, QFN48_LIGHTING-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long 0 - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long 0 - .long AC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ AC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21g17a.go b/device/sam/atsamd21g17a.go index 7604ca9..f5fe621 100644 --- a/device/sam/atsamd21g17a.go +++ b/device/sam/atsamd21g17a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -120,8 +120,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21g17a.s b/device/sam/atsamd21g17a.s deleted file mode 100644 index 06dab56..0000000 --- a/device/sam/atsamd21g17a.s +++ /dev/null @@ -1,134 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21G17A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21G17A device: Cortex-M0+ Microcontroller with 128KB Flash, 16KB SRAM, 48-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21g17au.go b/device/sam/atsamd21g17au.go index bf1db03..eded514 100644 --- a/device/sam/atsamd21g17au.go +++ b/device/sam/atsamd21g17au.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21g17au.s b/device/sam/atsamd21g17au.s deleted file mode 100644 index f26c350..0000000 --- a/device/sam/atsamd21g17au.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21G17AU.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21G17AU device: Cortex-M0+ Microcontroller with 128KB Flash, 16KB SRAM, 45-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21g17d.go b/device/sam/atsamd21g17d.go index ce61cf1..99ec47c 100644 --- a/device/sam/atsamd21g17d.go +++ b/device/sam/atsamd21g17d.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -123,8 +123,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21g17d.s b/device/sam/atsamd21g17d.s deleted file mode 100644 index 26540d4..0000000 --- a/device/sam/atsamd21g17d.s +++ /dev/null @@ -1,137 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21G17D.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21G17D device: Cortex-M0+ Microcontroller with 128KB Flash, 16KB SRAM, 48-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - .long 0 - .long TCC3_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - IRQ TCC3_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21g17l.go b/device/sam/atsamd21g17l.go index e538974..dec1d77 100644 --- a/device/sam/atsamd21g17l.go +++ b/device/sam/atsamd21g17l.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21g17l.s b/device/sam/atsamd21g17l.s deleted file mode 100644 index 47b8ea5..0000000 --- a/device/sam/atsamd21g17l.s +++ /dev/null @@ -1,138 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21G17L.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21G17L device: Cortex-M0+ Microcontroller with 128KB Flash, 16KB SRAM, QFN48_LIGHTING-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long 0 - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long 0 - .long AC1_IRQHandler - .long TCC3_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ AC1_IRQHandler - IRQ TCC3_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21g18a.go b/device/sam/atsamd21g18a.go index 72ad08b..f01b036 100644 --- a/device/sam/atsamd21g18a.go +++ b/device/sam/atsamd21g18a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -120,8 +120,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21g18a.s b/device/sam/atsamd21g18a.s deleted file mode 100644 index 1511276..0000000 --- a/device/sam/atsamd21g18a.s +++ /dev/null @@ -1,134 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21G18A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21G18A device: Cortex-M0+ Microcontroller with 256KB Flash, 32KB SRAM, 48-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21g18au.go b/device/sam/atsamd21g18au.go index 927990e..ecb75cd 100644 --- a/device/sam/atsamd21g18au.go +++ b/device/sam/atsamd21g18au.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21g18au.s b/device/sam/atsamd21g18au.s deleted file mode 100644 index 4a49b64..0000000 --- a/device/sam/atsamd21g18au.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21G18AU.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21G18AU device: Cortex-M0+ Microcontroller with 256KB Flash, 32KB SRAM, 45-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21j15a.go b/device/sam/atsamd21j15a.go index 79442ee..e99a145 100644 --- a/device/sam/atsamd21j15a.go +++ b/device/sam/atsamd21j15a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21j15a.s b/device/sam/atsamd21j15a.s deleted file mode 100644 index 8cf7703..0000000 --- a/device/sam/atsamd21j15a.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21J15A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21J15A device: Cortex-M0+ Microcontroller with 32KB Flash, 4KB SRAM, 64-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21j15b.go b/device/sam/atsamd21j15b.go index 539def9..952acb7 100644 --- a/device/sam/atsamd21j15b.go +++ b/device/sam/atsamd21j15b.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21j15b.s b/device/sam/atsamd21j15b.s deleted file mode 100644 index c71a7ef..0000000 --- a/device/sam/atsamd21j15b.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21J15B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21J15B device: Cortex-M0+ Microcontroller with 32KB Flash, 4KB SRAM, 64-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21j16a.go b/device/sam/atsamd21j16a.go index 676ec6a..ea88f39 100644 --- a/device/sam/atsamd21j16a.go +++ b/device/sam/atsamd21j16a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21j16a.s b/device/sam/atsamd21j16a.s deleted file mode 100644 index a7ec475..0000000 --- a/device/sam/atsamd21j16a.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21J16A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21J16A device: Cortex-M0+ Microcontroller with 64KB Flash, 8KB SRAM, 64-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21j16b.go b/device/sam/atsamd21j16b.go index 635b7e1..31408d8 100644 --- a/device/sam/atsamd21j16b.go +++ b/device/sam/atsamd21j16b.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21j16b.s b/device/sam/atsamd21j16b.s deleted file mode 100644 index 786027e..0000000 --- a/device/sam/atsamd21j16b.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21J16B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21J16B device: Cortex-M0+ Microcontroller with 64KB Flash, 8KB SRAM, 64-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21j17a.go b/device/sam/atsamd21j17a.go index c855a98..4c2d663 100644 --- a/device/sam/atsamd21j17a.go +++ b/device/sam/atsamd21j17a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21j17a.s b/device/sam/atsamd21j17a.s deleted file mode 100644 index 49fcdb0..0000000 --- a/device/sam/atsamd21j17a.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21J17A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21J17A device: Cortex-M0+ Microcontroller with 128KB Flash, 16KB SRAM, 64-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21j17d.go b/device/sam/atsamd21j17d.go index f6e73f6..b070cb6 100644 --- a/device/sam/atsamd21j17d.go +++ b/device/sam/atsamd21j17d.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -129,8 +129,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21j17d.s b/device/sam/atsamd21j17d.s deleted file mode 100644 index ae4a3e7..0000000 --- a/device/sam/atsamd21j17d.s +++ /dev/null @@ -1,139 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21J17D.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21J17D device: Cortex-M0+ Microcontroller with 128KB Flash, 16KB SRAM, 64-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - .long 0 - .long TCC3_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - IRQ TCC3_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd21j18a.go b/device/sam/atsamd21j18a.go index e0a744d..ba59beb 100644 --- a/device/sam/atsamd21j18a.go +++ b/device/sam/atsamd21j18a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd21j18a.s b/device/sam/atsamd21j18a.s deleted file mode 100644 index 5b38f7d..0000000 --- a/device/sam/atsamd21j18a.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD21J18A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD21J18A device: Cortex-M0+ Microcontroller with 256KB Flash, 32KB SRAM, 64-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long SYSCTRL_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long USB_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TCC1_IRQHandler - .long TCC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long DAC_IRQHandler - .long 0 - .long I2S_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ SYSCTRL_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ USB_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TCC1_IRQHandler - IRQ TCC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_IRQHandler - IRQ I2S_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd51g18a.go b/device/sam/atsamd51g18a.go index f3d0c62..d5249e1 100644 --- a/device/sam/atsamd51g18a.go +++ b/device/sam/atsamd51g18a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -327,8 +327,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd51g18a.s b/device/sam/atsamd51g18a.s deleted file mode 100644 index 78be7e0..0000000 --- a/device/sam/atsamd51g18a.s +++ /dev/null @@ -1,313 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD51G18A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD51G18A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long 0 - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd51g19a.go b/device/sam/atsamd51g19a.go index 93de03a..5d40173 100644 --- a/device/sam/atsamd51g19a.go +++ b/device/sam/atsamd51g19a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -327,8 +327,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd51g19a.s b/device/sam/atsamd51g19a.s deleted file mode 100644 index 7e7cd23..0000000 --- a/device/sam/atsamd51g19a.s +++ /dev/null @@ -1,313 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD51G19A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD51G19A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long 0 - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd51j18a.go b/device/sam/atsamd51j18a.go index c7f509d..470ed95 100644 --- a/device/sam/atsamd51j18a.go +++ b/device/sam/atsamd51j18a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -346,8 +346,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd51j18a.s b/device/sam/atsamd51j18a.s deleted file mode 100644 index 19a9c09..0000000 --- a/device/sam/atsamd51j18a.s +++ /dev/null @@ -1,322 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD51J18A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD51J18A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd51j19a.go b/device/sam/atsamd51j19a.go index 5006fc2..23d1d8c 100644 --- a/device/sam/atsamd51j19a.go +++ b/device/sam/atsamd51j19a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -346,8 +346,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd51j19a.s b/device/sam/atsamd51j19a.s deleted file mode 100644 index 89de955..0000000 --- a/device/sam/atsamd51j19a.s +++ /dev/null @@ -1,322 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD51J19A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD51J19A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd51j20a.go b/device/sam/atsamd51j20a.go index 45e6de1..0c2892b 100644 --- a/device/sam/atsamd51j20a.go +++ b/device/sam/atsamd51j20a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -346,8 +346,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd51j20a.s b/device/sam/atsamd51j20a.s deleted file mode 100644 index 9e566b6..0000000 --- a/device/sam/atsamd51j20a.s +++ /dev/null @@ -1,322 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD51J20A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD51J20A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd51n19a.go b/device/sam/atsamd51n19a.go index 3780c5d..324624d 100644 --- a/device/sam/atsamd51n19a.go +++ b/device/sam/atsamd51n19a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -368,8 +368,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd51n19a.s b/device/sam/atsamd51n19a.s deleted file mode 100644 index 678955f..0000000 --- a/device/sam/atsamd51n19a.s +++ /dev/null @@ -1,334 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD51N19A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD51N19A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long SERCOM6_0_IRQHandler - .long SERCOM6_1_IRQHandler - .long SERCOM6_2_IRQHandler - .long SERCOM6_OTHER_IRQHandler - .long SERCOM7_0_IRQHandler - .long SERCOM7_1_IRQHandler - .long SERCOM7_2_IRQHandler - .long SERCOM7_OTHER_IRQHandler - .long 0 - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - .long SDHC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ SERCOM6_0_IRQHandler - IRQ SERCOM6_1_IRQHandler - IRQ SERCOM6_2_IRQHandler - IRQ SERCOM6_OTHER_IRQHandler - IRQ SERCOM7_0_IRQHandler - IRQ SERCOM7_1_IRQHandler - IRQ SERCOM7_2_IRQHandler - IRQ SERCOM7_OTHER_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - IRQ SDHC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd51n20a.go b/device/sam/atsamd51n20a.go index 699ce7d..0270fa4 100644 --- a/device/sam/atsamd51n20a.go +++ b/device/sam/atsamd51n20a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -368,8 +368,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd51n20a.s b/device/sam/atsamd51n20a.s deleted file mode 100644 index 2d3efaf..0000000 --- a/device/sam/atsamd51n20a.s +++ /dev/null @@ -1,334 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD51N20A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD51N20A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long SERCOM6_0_IRQHandler - .long SERCOM6_1_IRQHandler - .long SERCOM6_2_IRQHandler - .long SERCOM6_OTHER_IRQHandler - .long SERCOM7_0_IRQHandler - .long SERCOM7_1_IRQHandler - .long SERCOM7_2_IRQHandler - .long SERCOM7_OTHER_IRQHandler - .long 0 - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - .long SDHC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ SERCOM6_0_IRQHandler - IRQ SERCOM6_1_IRQHandler - IRQ SERCOM6_2_IRQHandler - IRQ SERCOM6_OTHER_IRQHandler - IRQ SERCOM7_0_IRQHandler - IRQ SERCOM7_1_IRQHandler - IRQ SERCOM7_2_IRQHandler - IRQ SERCOM7_OTHER_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - IRQ SDHC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd51p19a.go b/device/sam/atsamd51p19a.go index 7913cc4..aa36d2e 100644 --- a/device/sam/atsamd51p19a.go +++ b/device/sam/atsamd51p19a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -368,8 +368,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd51p19a.s b/device/sam/atsamd51p19a.s deleted file mode 100644 index 70d1eba..0000000 --- a/device/sam/atsamd51p19a.s +++ /dev/null @@ -1,334 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD51P19A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD51P19A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long SERCOM6_0_IRQHandler - .long SERCOM6_1_IRQHandler - .long SERCOM6_2_IRQHandler - .long SERCOM6_OTHER_IRQHandler - .long SERCOM7_0_IRQHandler - .long SERCOM7_1_IRQHandler - .long SERCOM7_2_IRQHandler - .long SERCOM7_OTHER_IRQHandler - .long 0 - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - .long SDHC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ SERCOM6_0_IRQHandler - IRQ SERCOM6_1_IRQHandler - IRQ SERCOM6_2_IRQHandler - IRQ SERCOM6_OTHER_IRQHandler - IRQ SERCOM7_0_IRQHandler - IRQ SERCOM7_1_IRQHandler - IRQ SERCOM7_2_IRQHandler - IRQ SERCOM7_OTHER_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - IRQ SDHC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamd51p20a.go b/device/sam/atsamd51p20a.go index e3219dc..1a4f89a 100644 --- a/device/sam/atsamd51p20a.go +++ b/device/sam/atsamd51p20a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -368,8 +368,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsamd51p20a.s b/device/sam/atsamd51p20a.s deleted file mode 100644 index b3dcaec..0000000 --- a/device/sam/atsamd51p20a.s +++ /dev/null @@ -1,334 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMD51P20A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMD51P20A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long SERCOM6_0_IRQHandler - .long SERCOM6_1_IRQHandler - .long SERCOM6_2_IRQHandler - .long SERCOM6_OTHER_IRQHandler - .long SERCOM7_0_IRQHandler - .long SERCOM7_1_IRQHandler - .long SERCOM7_2_IRQHandler - .long SERCOM7_OTHER_IRQHandler - .long 0 - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - .long SDHC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ SERCOM6_0_IRQHandler - IRQ SERCOM6_1_IRQHandler - IRQ SERCOM6_2_IRQHandler - IRQ SERCOM6_OTHER_IRQHandler - IRQ SERCOM7_0_IRQHandler - IRQ SERCOM7_1_IRQHandler - IRQ SERCOM7_2_IRQHandler - IRQ SERCOM7_OTHER_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - IRQ SDHC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame51g18a.go b/device/sam/atsame51g18a.go index 924d844..fece1e1 100644 --- a/device/sam/atsame51g18a.go +++ b/device/sam/atsame51g18a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -330,8 +330,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame51g18a.s b/device/sam/atsame51g18a.s deleted file mode 100644 index e5e213e..0000000 --- a/device/sam/atsame51g18a.s +++ /dev/null @@ -1,314 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME51G18A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME51G18A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CAN0_IRQHandler - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long 0 - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ CAN0_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame51g19a.go b/device/sam/atsame51g19a.go index 3eaeb6c..d7af136 100644 --- a/device/sam/atsame51g19a.go +++ b/device/sam/atsame51g19a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -330,8 +330,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame51g19a.s b/device/sam/atsame51g19a.s deleted file mode 100644 index 3a528c2..0000000 --- a/device/sam/atsame51g19a.s +++ /dev/null @@ -1,314 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME51G19A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME51G19A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CAN0_IRQHandler - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long 0 - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ CAN0_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame51j18a.go b/device/sam/atsame51j18a.go index aa21425..5b88cd3 100644 --- a/device/sam/atsame51j18a.go +++ b/device/sam/atsame51j18a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -351,8 +351,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame51j18a.s b/device/sam/atsame51j18a.s deleted file mode 100644 index 2c6435f..0000000 --- a/device/sam/atsame51j18a.s +++ /dev/null @@ -1,324 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME51J18A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME51J18A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CAN0_IRQHandler - .long CAN1_IRQHandler - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame51j19a.go b/device/sam/atsame51j19a.go index bf02533..64ab02c 100644 --- a/device/sam/atsame51j19a.go +++ b/device/sam/atsame51j19a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -351,8 +351,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame51j19a.s b/device/sam/atsame51j19a.s deleted file mode 100644 index 13952c3..0000000 --- a/device/sam/atsame51j19a.s +++ /dev/null @@ -1,324 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME51J19A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME51J19A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CAN0_IRQHandler - .long CAN1_IRQHandler - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame51j20a.go b/device/sam/atsame51j20a.go index 5f065d5..d6cbca4 100644 --- a/device/sam/atsame51j20a.go +++ b/device/sam/atsame51j20a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -351,8 +351,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame51j20a.s b/device/sam/atsame51j20a.s deleted file mode 100644 index d1c3bcb..0000000 --- a/device/sam/atsame51j20a.s +++ /dev/null @@ -1,324 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME51J20A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME51J20A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CAN0_IRQHandler - .long CAN1_IRQHandler - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame51n19a.go b/device/sam/atsame51n19a.go index a46c9f0..f1448b3 100644 --- a/device/sam/atsame51n19a.go +++ b/device/sam/atsame51n19a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -371,8 +371,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame51n19a.s b/device/sam/atsame51n19a.s deleted file mode 100644 index ef23720..0000000 --- a/device/sam/atsame51n19a.s +++ /dev/null @@ -1,334 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME51N19A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME51N19A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long SERCOM6_0_IRQHandler - .long SERCOM6_1_IRQHandler - .long SERCOM6_2_IRQHandler - .long SERCOM6_OTHER_IRQHandler - .long SERCOM7_0_IRQHandler - .long SERCOM7_1_IRQHandler - .long SERCOM7_2_IRQHandler - .long SERCOM7_OTHER_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ SERCOM6_0_IRQHandler - IRQ SERCOM6_1_IRQHandler - IRQ SERCOM6_2_IRQHandler - IRQ SERCOM6_OTHER_IRQHandler - IRQ SERCOM7_0_IRQHandler - IRQ SERCOM7_1_IRQHandler - IRQ SERCOM7_2_IRQHandler - IRQ SERCOM7_OTHER_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame51n20a.go b/device/sam/atsame51n20a.go index e1aa38d..32577f7 100644 --- a/device/sam/atsame51n20a.go +++ b/device/sam/atsame51n20a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -371,8 +371,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame51n20a.s b/device/sam/atsame51n20a.s deleted file mode 100644 index 221eff9..0000000 --- a/device/sam/atsame51n20a.s +++ /dev/null @@ -1,334 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME51N20A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME51N20A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long SERCOM6_0_IRQHandler - .long SERCOM6_1_IRQHandler - .long SERCOM6_2_IRQHandler - .long SERCOM6_OTHER_IRQHandler - .long SERCOM7_0_IRQHandler - .long SERCOM7_1_IRQHandler - .long SERCOM7_2_IRQHandler - .long SERCOM7_OTHER_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long 0 - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ SERCOM6_0_IRQHandler - IRQ SERCOM6_1_IRQHandler - IRQ SERCOM6_2_IRQHandler - IRQ SERCOM6_OTHER_IRQHandler - IRQ SERCOM7_0_IRQHandler - IRQ SERCOM7_1_IRQHandler - IRQ SERCOM7_2_IRQHandler - IRQ SERCOM7_OTHER_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame53j18a.go b/device/sam/atsame53j18a.go index 905b65d..b5d0a0c 100644 --- a/device/sam/atsame53j18a.go +++ b/device/sam/atsame53j18a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -349,8 +349,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame53j18a.s b/device/sam/atsame53j18a.s deleted file mode 100644 index d18d801..0000000 --- a/device/sam/atsame53j18a.s +++ /dev/null @@ -1,323 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME53J18A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME53J18A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long GMAC_IRQHandler - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame53j19a.go b/device/sam/atsame53j19a.go index e7d26cb..9dbb575 100644 --- a/device/sam/atsame53j19a.go +++ b/device/sam/atsame53j19a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -349,8 +349,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame53j19a.s b/device/sam/atsame53j19a.s deleted file mode 100644 index 5cb76c6..0000000 --- a/device/sam/atsame53j19a.s +++ /dev/null @@ -1,323 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME53J19A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME53J19A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long GMAC_IRQHandler - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame53j20a.go b/device/sam/atsame53j20a.go index 40ace94..c317f9f 100644 --- a/device/sam/atsame53j20a.go +++ b/device/sam/atsame53j20a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -349,8 +349,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame53j20a.s b/device/sam/atsame53j20a.s deleted file mode 100644 index c380d8f..0000000 --- a/device/sam/atsame53j20a.s +++ /dev/null @@ -1,323 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME53J20A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME53J20A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long GMAC_IRQHandler - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long 0 - .long 0 - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame53n19a.go b/device/sam/atsame53n19a.go index 12ca745..ea8f725 100644 --- a/device/sam/atsame53n19a.go +++ b/device/sam/atsame53n19a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -371,8 +371,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame53n19a.s b/device/sam/atsame53n19a.s deleted file mode 100644 index e9518b4..0000000 --- a/device/sam/atsame53n19a.s +++ /dev/null @@ -1,335 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME53N19A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME53N19A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long SERCOM6_0_IRQHandler - .long SERCOM6_1_IRQHandler - .long SERCOM6_2_IRQHandler - .long SERCOM6_OTHER_IRQHandler - .long SERCOM7_0_IRQHandler - .long SERCOM7_1_IRQHandler - .long SERCOM7_2_IRQHandler - .long SERCOM7_OTHER_IRQHandler - .long 0 - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long GMAC_IRQHandler - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - .long SDHC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ SERCOM6_0_IRQHandler - IRQ SERCOM6_1_IRQHandler - IRQ SERCOM6_2_IRQHandler - IRQ SERCOM6_OTHER_IRQHandler - IRQ SERCOM7_0_IRQHandler - IRQ SERCOM7_1_IRQHandler - IRQ SERCOM7_2_IRQHandler - IRQ SERCOM7_OTHER_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - IRQ SDHC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame53n20a.go b/device/sam/atsame53n20a.go index 1cd8398..be87e31 100644 --- a/device/sam/atsame53n20a.go +++ b/device/sam/atsame53n20a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -371,8 +371,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame53n20a.s b/device/sam/atsame53n20a.s deleted file mode 100644 index ee85b1d..0000000 --- a/device/sam/atsame53n20a.s +++ /dev/null @@ -1,335 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME53N20A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME53N20A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long SERCOM6_0_IRQHandler - .long SERCOM6_1_IRQHandler - .long SERCOM6_2_IRQHandler - .long SERCOM6_OTHER_IRQHandler - .long SERCOM7_0_IRQHandler - .long SERCOM7_1_IRQHandler - .long SERCOM7_2_IRQHandler - .long SERCOM7_OTHER_IRQHandler - .long 0 - .long 0 - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long GMAC_IRQHandler - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - .long SDHC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ SERCOM6_0_IRQHandler - IRQ SERCOM6_1_IRQHandler - IRQ SERCOM6_2_IRQHandler - IRQ SERCOM6_OTHER_IRQHandler - IRQ SERCOM7_0_IRQHandler - IRQ SERCOM7_1_IRQHandler - IRQ SERCOM7_2_IRQHandler - IRQ SERCOM7_OTHER_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - IRQ SDHC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame54n19a.go b/device/sam/atsame54n19a.go index 23b1144..e7ec783 100644 --- a/device/sam/atsame54n19a.go +++ b/device/sam/atsame54n19a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -376,8 +376,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame54n19a.s b/device/sam/atsame54n19a.s deleted file mode 100644 index da30a82..0000000 --- a/device/sam/atsame54n19a.s +++ /dev/null @@ -1,337 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME54N19A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME54N19A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long SERCOM6_0_IRQHandler - .long SERCOM6_1_IRQHandler - .long SERCOM6_2_IRQHandler - .long SERCOM6_OTHER_IRQHandler - .long SERCOM7_0_IRQHandler - .long SERCOM7_1_IRQHandler - .long SERCOM7_2_IRQHandler - .long SERCOM7_OTHER_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long GMAC_IRQHandler - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - .long SDHC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ SERCOM6_0_IRQHandler - IRQ SERCOM6_1_IRQHandler - IRQ SERCOM6_2_IRQHandler - IRQ SERCOM6_OTHER_IRQHandler - IRQ SERCOM7_0_IRQHandler - IRQ SERCOM7_1_IRQHandler - IRQ SERCOM7_2_IRQHandler - IRQ SERCOM7_OTHER_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - IRQ SDHC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame54n20a.go b/device/sam/atsame54n20a.go index 706d7f2..86e5a54 100644 --- a/device/sam/atsame54n20a.go +++ b/device/sam/atsame54n20a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -376,8 +376,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame54n20a.s b/device/sam/atsame54n20a.s deleted file mode 100644 index f1e2209..0000000 --- a/device/sam/atsame54n20a.s +++ /dev/null @@ -1,337 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME54N20A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME54N20A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long SERCOM6_0_IRQHandler - .long SERCOM6_1_IRQHandler - .long SERCOM6_2_IRQHandler - .long SERCOM6_OTHER_IRQHandler - .long SERCOM7_0_IRQHandler - .long SERCOM7_1_IRQHandler - .long SERCOM7_2_IRQHandler - .long SERCOM7_OTHER_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long GMAC_IRQHandler - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - .long SDHC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ SERCOM6_0_IRQHandler - IRQ SERCOM6_1_IRQHandler - IRQ SERCOM6_2_IRQHandler - IRQ SERCOM6_OTHER_IRQHandler - IRQ SERCOM7_0_IRQHandler - IRQ SERCOM7_1_IRQHandler - IRQ SERCOM7_2_IRQHandler - IRQ SERCOM7_OTHER_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - IRQ SDHC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame54p19a.go b/device/sam/atsame54p19a.go index 5e227a0..6ec8d72 100644 --- a/device/sam/atsame54p19a.go +++ b/device/sam/atsame54p19a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -376,8 +376,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame54p19a.s b/device/sam/atsame54p19a.s deleted file mode 100644 index 26bfe87..0000000 --- a/device/sam/atsame54p19a.s +++ /dev/null @@ -1,337 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME54P19A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME54P19A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long SERCOM6_0_IRQHandler - .long SERCOM6_1_IRQHandler - .long SERCOM6_2_IRQHandler - .long SERCOM6_OTHER_IRQHandler - .long SERCOM7_0_IRQHandler - .long SERCOM7_1_IRQHandler - .long SERCOM7_2_IRQHandler - .long SERCOM7_OTHER_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long GMAC_IRQHandler - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - .long SDHC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ SERCOM6_0_IRQHandler - IRQ SERCOM6_1_IRQHandler - IRQ SERCOM6_2_IRQHandler - IRQ SERCOM6_OTHER_IRQHandler - IRQ SERCOM7_0_IRQHandler - IRQ SERCOM7_1_IRQHandler - IRQ SERCOM7_2_IRQHandler - IRQ SERCOM7_OTHER_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - IRQ SDHC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame54p20a.go b/device/sam/atsame54p20a.go index ec540c7..6bef465 100644 --- a/device/sam/atsame54p20a.go +++ b/device/sam/atsame54p20a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -376,8 +376,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_IRQHandler func interruptPM() { diff --git a/device/sam/atsame54p20a.s b/device/sam/atsame54p20a.s deleted file mode 100644 index 6c91ec1..0000000 --- a/device/sam/atsame54p20a.s +++ /dev/null @@ -1,337 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME54P20A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME54P20A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_IRQHandler - .long MCLK_IRQHandler - .long OSCCTRL_XOSC0_IRQHandler - .long OSCCTRL_XOSC1_IRQHandler - .long OSCCTRL_DFLL_IRQHandler - .long OSCCTRL_DPLL0_IRQHandler - .long OSCCTRL_DPLL1_IRQHandler - .long OSC32KCTRL_IRQHandler - .long SUPC_OTHER_IRQHandler - .long SUPC_BODDET_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_EXTINT_0_IRQHandler - .long EIC_EXTINT_1_IRQHandler - .long EIC_EXTINT_2_IRQHandler - .long EIC_EXTINT_3_IRQHandler - .long EIC_EXTINT_4_IRQHandler - .long EIC_EXTINT_5_IRQHandler - .long EIC_EXTINT_6_IRQHandler - .long EIC_EXTINT_7_IRQHandler - .long EIC_EXTINT_8_IRQHandler - .long EIC_EXTINT_9_IRQHandler - .long EIC_EXTINT_10_IRQHandler - .long EIC_EXTINT_11_IRQHandler - .long EIC_EXTINT_12_IRQHandler - .long EIC_EXTINT_13_IRQHandler - .long EIC_EXTINT_14_IRQHandler - .long EIC_EXTINT_15_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_0_IRQHandler - .long NVMCTRL_1_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_OTHER_IRQHandler - .long PAC_IRQHandler - .long 0 - .long 0 - .long 0 - .long RAMECC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long SERCOM3_0_IRQHandler - .long SERCOM3_1_IRQHandler - .long SERCOM3_2_IRQHandler - .long SERCOM3_OTHER_IRQHandler - .long SERCOM4_0_IRQHandler - .long SERCOM4_1_IRQHandler - .long SERCOM4_2_IRQHandler - .long SERCOM4_OTHER_IRQHandler - .long SERCOM5_0_IRQHandler - .long SERCOM5_1_IRQHandler - .long SERCOM5_2_IRQHandler - .long SERCOM5_OTHER_IRQHandler - .long SERCOM6_0_IRQHandler - .long SERCOM6_1_IRQHandler - .long SERCOM6_2_IRQHandler - .long SERCOM6_OTHER_IRQHandler - .long SERCOM7_0_IRQHandler - .long SERCOM7_1_IRQHandler - .long SERCOM7_2_IRQHandler - .long SERCOM7_OTHER_IRQHandler - .long CAN0_IRQHandler - .long CAN1_IRQHandler - .long USB_OTHER_IRQHandler - .long USB_SOF_HSOF_IRQHandler - .long USB_TRCPT0_IRQHandler - .long USB_TRCPT1_IRQHandler - .long GMAC_IRQHandler - .long TCC0_OTHER_IRQHandler - .long TCC0_MC0_IRQHandler - .long TCC0_MC1_IRQHandler - .long TCC0_MC2_IRQHandler - .long TCC0_MC3_IRQHandler - .long TCC0_MC4_IRQHandler - .long TCC0_MC5_IRQHandler - .long TCC1_OTHER_IRQHandler - .long TCC1_MC0_IRQHandler - .long TCC1_MC1_IRQHandler - .long TCC1_MC2_IRQHandler - .long TCC1_MC3_IRQHandler - .long TCC2_OTHER_IRQHandler - .long TCC2_MC0_IRQHandler - .long TCC2_MC1_IRQHandler - .long TCC2_MC2_IRQHandler - .long TCC3_OTHER_IRQHandler - .long TCC3_MC0_IRQHandler - .long TCC3_MC1_IRQHandler - .long TCC4_OTHER_IRQHandler - .long TCC4_MC0_IRQHandler - .long TCC4_MC1_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long PDEC_OTHER_IRQHandler - .long PDEC_MC0_IRQHandler - .long PDEC_MC1_IRQHandler - .long ADC0_OTHER_IRQHandler - .long ADC0_RESRDY_IRQHandler - .long ADC1_OTHER_IRQHandler - .long ADC1_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_OTHER_IRQHandler - .long DAC_EMPTY_0_IRQHandler - .long DAC_EMPTY_1_IRQHandler - .long DAC_RESRDY_0_IRQHandler - .long DAC_RESRDY_1_IRQHandler - .long I2S_IRQHandler - .long PCC_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - .long ICM_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long SDHC0_IRQHandler - .long SDHC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_IRQHandler - IRQ MCLK_IRQHandler - IRQ OSCCTRL_XOSC0_IRQHandler - IRQ OSCCTRL_XOSC1_IRQHandler - IRQ OSCCTRL_DFLL_IRQHandler - IRQ OSCCTRL_DPLL0_IRQHandler - IRQ OSCCTRL_DPLL1_IRQHandler - IRQ OSC32KCTRL_IRQHandler - IRQ SUPC_OTHER_IRQHandler - IRQ SUPC_BODDET_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_EXTINT_0_IRQHandler - IRQ EIC_EXTINT_1_IRQHandler - IRQ EIC_EXTINT_2_IRQHandler - IRQ EIC_EXTINT_3_IRQHandler - IRQ EIC_EXTINT_4_IRQHandler - IRQ EIC_EXTINT_5_IRQHandler - IRQ EIC_EXTINT_6_IRQHandler - IRQ EIC_EXTINT_7_IRQHandler - IRQ EIC_EXTINT_8_IRQHandler - IRQ EIC_EXTINT_9_IRQHandler - IRQ EIC_EXTINT_10_IRQHandler - IRQ EIC_EXTINT_11_IRQHandler - IRQ EIC_EXTINT_12_IRQHandler - IRQ EIC_EXTINT_13_IRQHandler - IRQ EIC_EXTINT_14_IRQHandler - IRQ EIC_EXTINT_15_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_0_IRQHandler - IRQ NVMCTRL_1_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_OTHER_IRQHandler - IRQ PAC_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ SERCOM3_0_IRQHandler - IRQ SERCOM3_1_IRQHandler - IRQ SERCOM3_2_IRQHandler - IRQ SERCOM3_OTHER_IRQHandler - IRQ SERCOM4_0_IRQHandler - IRQ SERCOM4_1_IRQHandler - IRQ SERCOM4_2_IRQHandler - IRQ SERCOM4_OTHER_IRQHandler - IRQ SERCOM5_0_IRQHandler - IRQ SERCOM5_1_IRQHandler - IRQ SERCOM5_2_IRQHandler - IRQ SERCOM5_OTHER_IRQHandler - IRQ SERCOM6_0_IRQHandler - IRQ SERCOM6_1_IRQHandler - IRQ SERCOM6_2_IRQHandler - IRQ SERCOM6_OTHER_IRQHandler - IRQ SERCOM7_0_IRQHandler - IRQ SERCOM7_1_IRQHandler - IRQ SERCOM7_2_IRQHandler - IRQ SERCOM7_OTHER_IRQHandler - IRQ CAN0_IRQHandler - IRQ CAN1_IRQHandler - IRQ USB_OTHER_IRQHandler - IRQ USB_SOF_HSOF_IRQHandler - IRQ USB_TRCPT0_IRQHandler - IRQ USB_TRCPT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ TCC0_OTHER_IRQHandler - IRQ TCC0_MC0_IRQHandler - IRQ TCC0_MC1_IRQHandler - IRQ TCC0_MC2_IRQHandler - IRQ TCC0_MC3_IRQHandler - IRQ TCC0_MC4_IRQHandler - IRQ TCC0_MC5_IRQHandler - IRQ TCC1_OTHER_IRQHandler - IRQ TCC1_MC0_IRQHandler - IRQ TCC1_MC1_IRQHandler - IRQ TCC1_MC2_IRQHandler - IRQ TCC1_MC3_IRQHandler - IRQ TCC2_OTHER_IRQHandler - IRQ TCC2_MC0_IRQHandler - IRQ TCC2_MC1_IRQHandler - IRQ TCC2_MC2_IRQHandler - IRQ TCC3_OTHER_IRQHandler - IRQ TCC3_MC0_IRQHandler - IRQ TCC3_MC1_IRQHandler - IRQ TCC4_OTHER_IRQHandler - IRQ TCC4_MC0_IRQHandler - IRQ TCC4_MC1_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ PDEC_OTHER_IRQHandler - IRQ PDEC_MC0_IRQHandler - IRQ PDEC_MC1_IRQHandler - IRQ ADC0_OTHER_IRQHandler - IRQ ADC0_RESRDY_IRQHandler - IRQ ADC1_OTHER_IRQHandler - IRQ ADC1_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_OTHER_IRQHandler - IRQ DAC_EMPTY_0_IRQHandler - IRQ DAC_EMPTY_1_IRQHandler - IRQ DAC_RESRDY_0_IRQHandler - IRQ DAC_RESRDY_1_IRQHandler - IRQ I2S_IRQHandler - IRQ PCC_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ ICM_IRQHandler - IRQ QSPI_IRQHandler - IRQ SDHC0_IRQHandler - IRQ SDHC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70j19.go b/device/sam/atsame70j19.go index 9439958..fdc4106 100644 --- a/device/sam/atsame70j19.go +++ b/device/sam/atsame70j19.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -167,8 +167,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70j19.s b/device/sam/atsame70j19.s deleted file mode 100644 index ea7c8b0..0000000 --- a/device/sam/atsame70j19.s +++ /dev/null @@ -1,187 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70J19.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70J19 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70j19b.go b/device/sam/atsame70j19b.go index ab5a9f8..03fee7a 100644 --- a/device/sam/atsame70j19b.go +++ b/device/sam/atsame70j19b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -182,8 +182,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70j19b.s b/device/sam/atsame70j19b.s deleted file mode 100644 index b2248b4..0000000 --- a/device/sam/atsame70j19b.s +++ /dev/null @@ -1,197 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70J19B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70J19B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long 0 - .long 0 - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70j20.go b/device/sam/atsame70j20.go index a4b5995..3eed874 100644 --- a/device/sam/atsame70j20.go +++ b/device/sam/atsame70j20.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -167,8 +167,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70j20.s b/device/sam/atsame70j20.s deleted file mode 100644 index e49edf3..0000000 --- a/device/sam/atsame70j20.s +++ /dev/null @@ -1,187 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70J20.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70J20 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70j20b.go b/device/sam/atsame70j20b.go index 959dab1..db4e423 100644 --- a/device/sam/atsame70j20b.go +++ b/device/sam/atsame70j20b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -182,8 +182,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70j20b.s b/device/sam/atsame70j20b.s deleted file mode 100644 index 10c57ee..0000000 --- a/device/sam/atsame70j20b.s +++ /dev/null @@ -1,197 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70J20B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70J20B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long 0 - .long 0 - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70j21.go b/device/sam/atsame70j21.go index 6ab242d..3bda6da 100644 --- a/device/sam/atsame70j21.go +++ b/device/sam/atsame70j21.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -167,8 +167,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70j21.s b/device/sam/atsame70j21.s deleted file mode 100644 index 0b6e4c2..0000000 --- a/device/sam/atsame70j21.s +++ /dev/null @@ -1,187 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70J21.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70J21 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70j21b.go b/device/sam/atsame70j21b.go index d37b2af..bfb5f1b 100644 --- a/device/sam/atsame70j21b.go +++ b/device/sam/atsame70j21b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -182,8 +182,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70j21b.s b/device/sam/atsame70j21b.s deleted file mode 100644 index a900943..0000000 --- a/device/sam/atsame70j21b.s +++ /dev/null @@ -1,197 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70J21B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70J21B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long 0 - .long 0 - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70n19.go b/device/sam/atsame70n19.go index 605bd17..0fb82aa 100644 --- a/device/sam/atsame70n19.go +++ b/device/sam/atsame70n19.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -185,8 +185,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70n19.s b/device/sam/atsame70n19.s deleted file mode 100644 index 6679359..0000000 --- a/device/sam/atsame70n19.s +++ /dev/null @@ -1,195 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70N19.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70N19 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70n19b.go b/device/sam/atsame70n19b.go index 63a0be4..7a33b1c 100644 --- a/device/sam/atsame70n19b.go +++ b/device/sam/atsame70n19b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -203,8 +203,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70n19b.s b/device/sam/atsame70n19b.s deleted file mode 100644 index 8ad8d60..0000000 --- a/device/sam/atsame70n19b.s +++ /dev/null @@ -1,206 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70N19B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70N19B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long 0 - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70n20.go b/device/sam/atsame70n20.go index 32e66fa..3c209c6 100644 --- a/device/sam/atsame70n20.go +++ b/device/sam/atsame70n20.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -185,8 +185,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70n20.s b/device/sam/atsame70n20.s deleted file mode 100644 index ae34618..0000000 --- a/device/sam/atsame70n20.s +++ /dev/null @@ -1,195 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70N20.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70N20 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70n20b.go b/device/sam/atsame70n20b.go index 722352c..5f3b868 100644 --- a/device/sam/atsame70n20b.go +++ b/device/sam/atsame70n20b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -203,8 +203,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70n20b.s b/device/sam/atsame70n20b.s deleted file mode 100644 index 04995ea..0000000 --- a/device/sam/atsame70n20b.s +++ /dev/null @@ -1,206 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70N20B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70N20B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long 0 - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70n21.go b/device/sam/atsame70n21.go index 9810e42..727b593 100644 --- a/device/sam/atsame70n21.go +++ b/device/sam/atsame70n21.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -185,8 +185,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70n21.s b/device/sam/atsame70n21.s deleted file mode 100644 index a91e3ce..0000000 --- a/device/sam/atsame70n21.s +++ /dev/null @@ -1,195 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70N21.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70N21 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70n21b.go b/device/sam/atsame70n21b.go index 4630563..7afd505 100644 --- a/device/sam/atsame70n21b.go +++ b/device/sam/atsame70n21b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -203,8 +203,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70n21b.s b/device/sam/atsame70n21b.s deleted file mode 100644 index 28044c8..0000000 --- a/device/sam/atsame70n21b.s +++ /dev/null @@ -1,206 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70N21B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70N21B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long 0 - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70q19.go b/device/sam/atsame70q19.go index f4f7032..6ed81e1 100644 --- a/device/sam/atsame70q19.go +++ b/device/sam/atsame70q19.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -194,8 +194,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70q19.s b/device/sam/atsame70q19.s deleted file mode 100644 index 76c8840..0000000 --- a/device/sam/atsame70q19.s +++ /dev/null @@ -1,199 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70Q19.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70Q19 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70q19b.go b/device/sam/atsame70q19b.go index 49c4842..37abea1 100644 --- a/device/sam/atsame70q19b.go +++ b/device/sam/atsame70q19b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -214,8 +214,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70q19b.s b/device/sam/atsame70q19b.s deleted file mode 100644 index c542a61..0000000 --- a/device/sam/atsame70q19b.s +++ /dev/null @@ -1,211 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70Q19B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70Q19B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long I2SC1_IRQHandler - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ I2SC1_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70q20.go b/device/sam/atsame70q20.go index 3db70af..36a3c03 100644 --- a/device/sam/atsame70q20.go +++ b/device/sam/atsame70q20.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -194,8 +194,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70q20.s b/device/sam/atsame70q20.s deleted file mode 100644 index 438a0d1..0000000 --- a/device/sam/atsame70q20.s +++ /dev/null @@ -1,199 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70Q20.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70Q20 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70q20b.go b/device/sam/atsame70q20b.go index 8e074dd..112d79c 100644 --- a/device/sam/atsame70q20b.go +++ b/device/sam/atsame70q20b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -214,8 +214,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70q20b.s b/device/sam/atsame70q20b.s deleted file mode 100644 index 95675cd..0000000 --- a/device/sam/atsame70q20b.s +++ /dev/null @@ -1,211 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70Q20B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70Q20B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long I2SC1_IRQHandler - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ I2SC1_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70q21.go b/device/sam/atsame70q21.go index 3797eda..8d1bc13 100644 --- a/device/sam/atsame70q21.go +++ b/device/sam/atsame70q21.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -194,8 +194,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70q21.s b/device/sam/atsame70q21.s deleted file mode 100644 index cc5b674..0000000 --- a/device/sam/atsame70q21.s +++ /dev/null @@ -1,199 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70Q21.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70Q21 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsame70q21b.go b/device/sam/atsame70q21b.go index 1fd52c7..79a6093 100644 --- a/device/sam/atsame70q21b.go +++ b/device/sam/atsame70q21b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -214,8 +214,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsame70q21b.s b/device/sam/atsame70q21b.s deleted file mode 100644 index 159f068..0000000 --- a/device/sam/atsame70q21b.s +++ /dev/null @@ -1,211 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAME70Q21B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAME70Q21B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long I2SC1_IRQHandler - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ I2SC1_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml11d14a.go b/device/sam/atsaml11d14a.go index 36a6ffd..ac02aa4 100644 --- a/device/sam/atsaml11d14a.go +++ b/device/sam/atsaml11d14a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -145,8 +145,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WDT_IRQHandler func interruptWDT() { diff --git a/device/sam/atsaml11d14a.s b/device/sam/atsaml11d14a.s deleted file mode 100644 index 0058ab1..0000000 --- a/device/sam/atsaml11d14a.s +++ /dev/null @@ -1,152 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML11D14A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML11D14A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_0_IRQHandler - .long EIC_1_IRQHandler - .long EIC_2_IRQHandler - .long EIC_3_IRQHandler - .long EIC_OTHER_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_IRQHandler - .long PORT_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_NSCHK_IRQHandler - .long PAC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long ADC_OTHER_IRQHandler - .long ADC_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_UNDERRUN_A_IRQHandler - .long DAC_EMPTY_IRQHandler - .long PTC_IRQHandler - .long TRNG_IRQHandler - .long TRAM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_0_IRQHandler - IRQ EIC_1_IRQHandler - IRQ EIC_2_IRQHandler - IRQ EIC_3_IRQHandler - IRQ EIC_OTHER_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ PORT_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_NSCHK_IRQHandler - IRQ PAC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_OTHER_IRQHandler - IRQ ADC_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_UNDERRUN_A_IRQHandler - IRQ DAC_EMPTY_IRQHandler - IRQ PTC_IRQHandler - IRQ TRNG_IRQHandler - IRQ TRAM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml11d15a.go b/device/sam/atsaml11d15a.go index 0e59783..fc1f6a2 100644 --- a/device/sam/atsaml11d15a.go +++ b/device/sam/atsaml11d15a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -145,8 +145,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WDT_IRQHandler func interruptWDT() { diff --git a/device/sam/atsaml11d15a.s b/device/sam/atsaml11d15a.s deleted file mode 100644 index a6dfde5..0000000 --- a/device/sam/atsaml11d15a.s +++ /dev/null @@ -1,152 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML11D15A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML11D15A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_0_IRQHandler - .long EIC_1_IRQHandler - .long EIC_2_IRQHandler - .long EIC_3_IRQHandler - .long EIC_OTHER_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_IRQHandler - .long PORT_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_NSCHK_IRQHandler - .long PAC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long ADC_OTHER_IRQHandler - .long ADC_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_UNDERRUN_A_IRQHandler - .long DAC_EMPTY_IRQHandler - .long PTC_IRQHandler - .long TRNG_IRQHandler - .long TRAM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_0_IRQHandler - IRQ EIC_1_IRQHandler - IRQ EIC_2_IRQHandler - IRQ EIC_3_IRQHandler - IRQ EIC_OTHER_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ PORT_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_NSCHK_IRQHandler - IRQ PAC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_OTHER_IRQHandler - IRQ ADC_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_UNDERRUN_A_IRQHandler - IRQ DAC_EMPTY_IRQHandler - IRQ PTC_IRQHandler - IRQ TRNG_IRQHandler - IRQ TRAM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml11d16a.go b/device/sam/atsaml11d16a.go index 79f16a9..eb099d2 100644 --- a/device/sam/atsaml11d16a.go +++ b/device/sam/atsaml11d16a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -145,8 +145,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WDT_IRQHandler func interruptWDT() { diff --git a/device/sam/atsaml11d16a.s b/device/sam/atsaml11d16a.s deleted file mode 100644 index ee71b81..0000000 --- a/device/sam/atsaml11d16a.s +++ /dev/null @@ -1,152 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML11D16A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML11D16A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_0_IRQHandler - .long EIC_1_IRQHandler - .long EIC_2_IRQHandler - .long EIC_3_IRQHandler - .long EIC_OTHER_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_IRQHandler - .long PORT_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_NSCHK_IRQHandler - .long PAC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long ADC_OTHER_IRQHandler - .long ADC_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_UNDERRUN_A_IRQHandler - .long DAC_EMPTY_IRQHandler - .long PTC_IRQHandler - .long TRNG_IRQHandler - .long TRAM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_0_IRQHandler - IRQ EIC_1_IRQHandler - IRQ EIC_2_IRQHandler - IRQ EIC_3_IRQHandler - IRQ EIC_OTHER_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ PORT_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_NSCHK_IRQHandler - IRQ PAC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_OTHER_IRQHandler - IRQ ADC_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_UNDERRUN_A_IRQHandler - IRQ DAC_EMPTY_IRQHandler - IRQ PTC_IRQHandler - IRQ TRNG_IRQHandler - IRQ TRAM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml11e14a.go b/device/sam/atsaml11e14a.go index d59aa82..38f9a7c 100644 --- a/device/sam/atsaml11e14a.go +++ b/device/sam/atsaml11e14a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -153,8 +153,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WDT_IRQHandler func interruptWDT() { diff --git a/device/sam/atsaml11e14a.s b/device/sam/atsaml11e14a.s deleted file mode 100644 index 46cb4cc..0000000 --- a/device/sam/atsaml11e14a.s +++ /dev/null @@ -1,156 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML11E14A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML11E14A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_0_IRQHandler - .long EIC_1_IRQHandler - .long EIC_2_IRQHandler - .long EIC_3_IRQHandler - .long EIC_OTHER_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_IRQHandler - .long PORT_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_NSCHK_IRQHandler - .long PAC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long ADC_OTHER_IRQHandler - .long ADC_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_UNDERRUN_A_IRQHandler - .long DAC_EMPTY_IRQHandler - .long PTC_IRQHandler - .long TRNG_IRQHandler - .long TRAM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_0_IRQHandler - IRQ EIC_1_IRQHandler - IRQ EIC_2_IRQHandler - IRQ EIC_3_IRQHandler - IRQ EIC_OTHER_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ PORT_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_NSCHK_IRQHandler - IRQ PAC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_OTHER_IRQHandler - IRQ ADC_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_UNDERRUN_A_IRQHandler - IRQ DAC_EMPTY_IRQHandler - IRQ PTC_IRQHandler - IRQ TRNG_IRQHandler - IRQ TRAM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml11e15a.go b/device/sam/atsaml11e15a.go index aeacd1e..f4605f9 100644 --- a/device/sam/atsaml11e15a.go +++ b/device/sam/atsaml11e15a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -153,8 +153,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WDT_IRQHandler func interruptWDT() { diff --git a/device/sam/atsaml11e15a.s b/device/sam/atsaml11e15a.s deleted file mode 100644 index 2f58e36..0000000 --- a/device/sam/atsaml11e15a.s +++ /dev/null @@ -1,156 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML11E15A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML11E15A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_0_IRQHandler - .long EIC_1_IRQHandler - .long EIC_2_IRQHandler - .long EIC_3_IRQHandler - .long EIC_OTHER_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_IRQHandler - .long PORT_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_NSCHK_IRQHandler - .long PAC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long ADC_OTHER_IRQHandler - .long ADC_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_UNDERRUN_A_IRQHandler - .long DAC_EMPTY_IRQHandler - .long PTC_IRQHandler - .long TRNG_IRQHandler - .long TRAM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_0_IRQHandler - IRQ EIC_1_IRQHandler - IRQ EIC_2_IRQHandler - IRQ EIC_3_IRQHandler - IRQ EIC_OTHER_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ PORT_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_NSCHK_IRQHandler - IRQ PAC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_OTHER_IRQHandler - IRQ ADC_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_UNDERRUN_A_IRQHandler - IRQ DAC_EMPTY_IRQHandler - IRQ PTC_IRQHandler - IRQ TRNG_IRQHandler - IRQ TRAM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml11e16a.go b/device/sam/atsaml11e16a.go index 399fc82..5cb1bc3 100644 --- a/device/sam/atsaml11e16a.go +++ b/device/sam/atsaml11e16a.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -153,8 +153,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WDT_IRQHandler func interruptWDT() { diff --git a/device/sam/atsaml11e16a.s b/device/sam/atsaml11e16a.s deleted file mode 100644 index c154f51..0000000 --- a/device/sam/atsaml11e16a.s +++ /dev/null @@ -1,156 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML11E16A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML11E16A Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_0_IRQHandler - .long EIC_1_IRQHandler - .long EIC_2_IRQHandler - .long EIC_3_IRQHandler - .long EIC_OTHER_IRQHandler - .long FREQM_IRQHandler - .long NVMCTRL_IRQHandler - .long PORT_IRQHandler - .long DMAC_0_IRQHandler - .long DMAC_1_IRQHandler - .long DMAC_2_IRQHandler - .long DMAC_3_IRQHandler - .long DMAC_OTHER_IRQHandler - .long EVSYS_0_IRQHandler - .long EVSYS_1_IRQHandler - .long EVSYS_2_IRQHandler - .long EVSYS_3_IRQHandler - .long EVSYS_NSCHK_IRQHandler - .long PAC_IRQHandler - .long SERCOM0_0_IRQHandler - .long SERCOM0_1_IRQHandler - .long SERCOM0_2_IRQHandler - .long SERCOM0_OTHER_IRQHandler - .long SERCOM1_0_IRQHandler - .long SERCOM1_1_IRQHandler - .long SERCOM1_2_IRQHandler - .long SERCOM1_OTHER_IRQHandler - .long SERCOM2_0_IRQHandler - .long SERCOM2_1_IRQHandler - .long SERCOM2_2_IRQHandler - .long SERCOM2_OTHER_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long ADC_OTHER_IRQHandler - .long ADC_RESRDY_IRQHandler - .long AC_IRQHandler - .long DAC_UNDERRUN_A_IRQHandler - .long DAC_EMPTY_IRQHandler - .long PTC_IRQHandler - .long TRNG_IRQHandler - .long TRAM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_0_IRQHandler - IRQ EIC_1_IRQHandler - IRQ EIC_2_IRQHandler - IRQ EIC_3_IRQHandler - IRQ EIC_OTHER_IRQHandler - IRQ FREQM_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ PORT_IRQHandler - IRQ DMAC_0_IRQHandler - IRQ DMAC_1_IRQHandler - IRQ DMAC_2_IRQHandler - IRQ DMAC_3_IRQHandler - IRQ DMAC_OTHER_IRQHandler - IRQ EVSYS_0_IRQHandler - IRQ EVSYS_1_IRQHandler - IRQ EVSYS_2_IRQHandler - IRQ EVSYS_3_IRQHandler - IRQ EVSYS_NSCHK_IRQHandler - IRQ PAC_IRQHandler - IRQ SERCOM0_0_IRQHandler - IRQ SERCOM0_1_IRQHandler - IRQ SERCOM0_2_IRQHandler - IRQ SERCOM0_OTHER_IRQHandler - IRQ SERCOM1_0_IRQHandler - IRQ SERCOM1_1_IRQHandler - IRQ SERCOM1_2_IRQHandler - IRQ SERCOM1_OTHER_IRQHandler - IRQ SERCOM2_0_IRQHandler - IRQ SERCOM2_1_IRQHandler - IRQ SERCOM2_2_IRQHandler - IRQ SERCOM2_OTHER_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ ADC_OTHER_IRQHandler - IRQ ADC_RESRDY_IRQHandler - IRQ AC_IRQHandler - IRQ DAC_UNDERRUN_A_IRQHandler - IRQ DAC_EMPTY_IRQHandler - IRQ PTC_IRQHandler - IRQ TRNG_IRQHandler - IRQ TRAM_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml22g16a.go b/device/sam/atsaml22g16a.go index 8984cf6..fed6a24 100644 --- a/device/sam/atsaml22g16a.go +++ b/device/sam/atsaml22g16a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SYSTEM_IRQHandler func interruptSYSTEM() { diff --git a/device/sam/atsaml22g16a.s b/device/sam/atsaml22g16a.s deleted file mode 100644 index 710419d..0000000 --- a/device/sam/atsaml22g16a.s +++ /dev/null @@ -1,130 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML22G16A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML22G16A device: Cortex-M0+ Microcontroller with 64KB Flash, 8KB SRAM, 48-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SYSTEM_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long FREQM_IRQHandler - .long USB_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long 0 - .long SLCD_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SYSTEM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ FREQM_IRQHandler - IRQ USB_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ SLCD_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml22g17a.go b/device/sam/atsaml22g17a.go index a8e1c5d..b67175c 100644 --- a/device/sam/atsaml22g17a.go +++ b/device/sam/atsaml22g17a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SYSTEM_IRQHandler func interruptSYSTEM() { diff --git a/device/sam/atsaml22g17a.s b/device/sam/atsaml22g17a.s deleted file mode 100644 index 7150340..0000000 --- a/device/sam/atsaml22g17a.s +++ /dev/null @@ -1,130 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML22G17A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML22G17A device: Cortex-M0+ Microcontroller with 128KB Flash, 16KB SRAM, 49-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SYSTEM_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long FREQM_IRQHandler - .long USB_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long 0 - .long SLCD_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SYSTEM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ FREQM_IRQHandler - IRQ USB_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ SLCD_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml22g18a.go b/device/sam/atsaml22g18a.go index 3ee87b6..c6fdabb 100644 --- a/device/sam/atsaml22g18a.go +++ b/device/sam/atsaml22g18a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SYSTEM_IRQHandler func interruptSYSTEM() { diff --git a/device/sam/atsaml22g18a.s b/device/sam/atsaml22g18a.s deleted file mode 100644 index 274fb2c..0000000 --- a/device/sam/atsaml22g18a.s +++ /dev/null @@ -1,130 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML22G18A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML22G18A device: Cortex-M0+ Microcontroller with 256KB Flash, 32KB SRAM, 49-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SYSTEM_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long FREQM_IRQHandler - .long USB_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long 0 - .long SLCD_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SYSTEM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ FREQM_IRQHandler - IRQ USB_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ SLCD_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml22j16a.go b/device/sam/atsaml22j16a.go index 1348f43..5c5e225 100644 --- a/device/sam/atsaml22j16a.go +++ b/device/sam/atsaml22j16a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SYSTEM_IRQHandler func interruptSYSTEM() { diff --git a/device/sam/atsaml22j16a.s b/device/sam/atsaml22j16a.s deleted file mode 100644 index bc18d0b..0000000 --- a/device/sam/atsaml22j16a.s +++ /dev/null @@ -1,130 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML22J16A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML22J16A device: Cortex-M0+ Microcontroller with 64KB Flash, 8KB SRAM, 64-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SYSTEM_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long FREQM_IRQHandler - .long USB_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long 0 - .long SLCD_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SYSTEM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ FREQM_IRQHandler - IRQ USB_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ SLCD_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml22j17a.go b/device/sam/atsaml22j17a.go index 02a85ad..ff7b030 100644 --- a/device/sam/atsaml22j17a.go +++ b/device/sam/atsaml22j17a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SYSTEM_IRQHandler func interruptSYSTEM() { diff --git a/device/sam/atsaml22j17a.s b/device/sam/atsaml22j17a.s deleted file mode 100644 index 4b29eff..0000000 --- a/device/sam/atsaml22j17a.s +++ /dev/null @@ -1,130 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML22J17A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML22J17A device: Cortex-M0+ Microcontroller with 128KB Flash, 16KB SRAM, 64-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SYSTEM_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long FREQM_IRQHandler - .long USB_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long 0 - .long SLCD_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SYSTEM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ FREQM_IRQHandler - IRQ USB_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ SLCD_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml22j18a.go b/device/sam/atsaml22j18a.go index 4c5a5e9..c46bec4 100644 --- a/device/sam/atsaml22j18a.go +++ b/device/sam/atsaml22j18a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SYSTEM_IRQHandler func interruptSYSTEM() { diff --git a/device/sam/atsaml22j18a.s b/device/sam/atsaml22j18a.s deleted file mode 100644 index 1fb6a08..0000000 --- a/device/sam/atsaml22j18a.s +++ /dev/null @@ -1,130 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML22J18A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML22J18A device: Cortex-M0+ Microcontroller with 256KB Flash, 32KB SRAM, 64-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SYSTEM_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long FREQM_IRQHandler - .long USB_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long 0 - .long 0 - .long TCC0_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long 0 - .long SLCD_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SYSTEM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ FREQM_IRQHandler - IRQ USB_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ TCC0_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ SLCD_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml22n16a.go b/device/sam/atsaml22n16a.go index 624a85d..6e48385 100644 --- a/device/sam/atsaml22n16a.go +++ b/device/sam/atsaml22n16a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -120,8 +120,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SYSTEM_IRQHandler func interruptSYSTEM() { diff --git a/device/sam/atsaml22n16a.s b/device/sam/atsaml22n16a.s deleted file mode 100644 index 74584d4..0000000 --- a/device/sam/atsaml22n16a.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML22N16A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML22N16A device: Cortex-M0+ Microcontroller with 64KB Flash, 8KB SRAM, 100-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SYSTEM_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long FREQM_IRQHandler - .long USB_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long 0 - .long SLCD_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SYSTEM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ FREQM_IRQHandler - IRQ USB_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ SLCD_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml22n17a.go b/device/sam/atsaml22n17a.go index 744d77e..79a1521 100644 --- a/device/sam/atsaml22n17a.go +++ b/device/sam/atsaml22n17a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -120,8 +120,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SYSTEM_IRQHandler func interruptSYSTEM() { diff --git a/device/sam/atsaml22n17a.s b/device/sam/atsaml22n17a.s deleted file mode 100644 index 0aa3975..0000000 --- a/device/sam/atsaml22n17a.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML22N17A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML22N17A device: Cortex-M0+ Microcontroller with 128KB Flash, 16KB SRAM, 100-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SYSTEM_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long FREQM_IRQHandler - .long USB_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long 0 - .long SLCD_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SYSTEM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ FREQM_IRQHandler - IRQ USB_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ SLCD_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsaml22n18a.go b/device/sam/atsaml22n18a.go index 48251a8..94c9249 100644 --- a/device/sam/atsaml22n18a.go +++ b/device/sam/atsaml22n18a.go @@ -24,7 +24,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -120,8 +120,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SYSTEM_IRQHandler func interruptSYSTEM() { diff --git a/device/sam/atsaml22n18a.s b/device/sam/atsaml22n18a.s deleted file mode 100644 index 58b12b2..0000000 --- a/device/sam/atsaml22n18a.s +++ /dev/null @@ -1,132 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAML22N18A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAML22N18A device: Cortex-M0+ Microcontroller with 256KB Flash, 32KB SRAM, 100-pin package -*/ - -// Copyright (c) 2018 Microchip Technology Inc. -// -// SPDX-License-Identifier: Apache-2.0 -// -// 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. - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SYSTEM_IRQHandler - .long WDT_IRQHandler - .long RTC_IRQHandler - .long EIC_IRQHandler - .long FREQM_IRQHandler - .long USB_IRQHandler - .long NVMCTRL_IRQHandler - .long DMAC_IRQHandler - .long EVSYS_IRQHandler - .long SERCOM0_IRQHandler - .long SERCOM1_IRQHandler - .long SERCOM2_IRQHandler - .long SERCOM3_IRQHandler - .long SERCOM4_IRQHandler - .long SERCOM5_IRQHandler - .long TCC0_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long ADC_IRQHandler - .long AC_IRQHandler - .long 0 - .long SLCD_IRQHandler - .long AES_IRQHandler - .long TRNG_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SYSTEM_IRQHandler - IRQ WDT_IRQHandler - IRQ RTC_IRQHandler - IRQ EIC_IRQHandler - IRQ FREQM_IRQHandler - IRQ USB_IRQHandler - IRQ NVMCTRL_IRQHandler - IRQ DMAC_IRQHandler - IRQ EVSYS_IRQHandler - IRQ SERCOM0_IRQHandler - IRQ SERCOM1_IRQHandler - IRQ SERCOM2_IRQHandler - IRQ SERCOM3_IRQHandler - IRQ SERCOM4_IRQHandler - IRQ SERCOM5_IRQHandler - IRQ TCC0_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ ADC_IRQHandler - IRQ AC_IRQHandler - IRQ SLCD_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamr21e16a.go b/device/sam/atsamr21e16a.go index 9bd42c5..f7c3bd8 100644 --- a/device/sam/atsamr21e16a.go +++ b/device/sam/atsamr21e16a.go @@ -27,7 +27,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_INTREQ_IRQHandler func interruptPM_INTREQ() { diff --git a/device/sam/atsamr21e16a.s b/device/sam/atsamr21e16a.s deleted file mode 100644 index e25fc31..0000000 --- a/device/sam/atsamr21e16a.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMR21E16A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAMR21E16A device: Cortex-M0+ Microcontroller with 64KB Flash, 16KB SRAM, 233-pin package (refer to http://www.atmel.com/devices/SAMR21E16A.aspx for more) -*/ - -// ============================================================================ -// Atmel Microcontroller Software Support -// ============================================================================ -// Copyright (c) 2016 Atmel Corporation, -// a wholly owned subsidiary of Microchip Technology Inc. -// -// 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 Licence 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. -// ============================================================================ - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_INTREQ_IRQHandler - .long SYSCTRL_INTREQ_IRQHandler - .long WDT_INTREQ_IRQHandler - .long RTC_INTREQ_IRQHandler - .long EIC_INTREQ_IRQHandler - .long NVMCTRL_INTREQ_IRQHandler - .long DMAC_INTREQ_IRQHandler - .long USB_INTREQ_IRQHandler - .long EVSYS_INTREQ_IRQHandler - .long SERCOM0_INTREQ_IRQHandler - .long SERCOM1_INTREQ_IRQHandler - .long SERCOM2_INTREQ_IRQHandler - .long SERCOM3_INTREQ_IRQHandler - .long SERCOM4_INTREQ_IRQHandler - .long SERCOM5_INTREQ_IRQHandler - .long TCC0_INTREQ_IRQHandler - .long TCC1_INTREQ_IRQHandler - .long TCC2_INTREQ_IRQHandler - .long TC3_INTREQ_IRQHandler - .long TC4_INTREQ_IRQHandler - .long TC5_INTREQ_IRQHandler - .long TC6_INTREQ_IRQHandler - .long TC7_INTREQ_IRQHandler - .long ADC_INTREQ_IRQHandler - .long AC_INTREQ_IRQHandler - .long DAC_INTREQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_INTREQ_IRQHandler - IRQ SYSCTRL_INTREQ_IRQHandler - IRQ WDT_INTREQ_IRQHandler - IRQ RTC_INTREQ_IRQHandler - IRQ EIC_INTREQ_IRQHandler - IRQ NVMCTRL_INTREQ_IRQHandler - IRQ DMAC_INTREQ_IRQHandler - IRQ USB_INTREQ_IRQHandler - IRQ EVSYS_INTREQ_IRQHandler - IRQ SERCOM0_INTREQ_IRQHandler - IRQ SERCOM1_INTREQ_IRQHandler - IRQ SERCOM2_INTREQ_IRQHandler - IRQ SERCOM3_INTREQ_IRQHandler - IRQ SERCOM4_INTREQ_IRQHandler - IRQ SERCOM5_INTREQ_IRQHandler - IRQ TCC0_INTREQ_IRQHandler - IRQ TCC1_INTREQ_IRQHandler - IRQ TCC2_INTREQ_IRQHandler - IRQ TC3_INTREQ_IRQHandler - IRQ TC4_INTREQ_IRQHandler - IRQ TC5_INTREQ_IRQHandler - IRQ TC6_INTREQ_IRQHandler - IRQ TC7_INTREQ_IRQHandler - IRQ ADC_INTREQ_IRQHandler - IRQ AC_INTREQ_IRQHandler - IRQ DAC_INTREQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamr21e17a.go b/device/sam/atsamr21e17a.go index bd0301f..8a0e6f0 100644 --- a/device/sam/atsamr21e17a.go +++ b/device/sam/atsamr21e17a.go @@ -27,7 +27,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_INTREQ_IRQHandler func interruptPM_INTREQ() { diff --git a/device/sam/atsamr21e17a.s b/device/sam/atsamr21e17a.s deleted file mode 100644 index 66c5653..0000000 --- a/device/sam/atsamr21e17a.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMR21E17A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAMR21E17A device: Cortex-M0+ Microcontroller with 128KB Flash, 32KB SRAM, 233-pin package (refer to http://www.atmel.com/devices/SAMR21E17A.aspx for more) -*/ - -// ============================================================================ -// Atmel Microcontroller Software Support -// ============================================================================ -// Copyright (c) 2016 Atmel Corporation, -// a wholly owned subsidiary of Microchip Technology Inc. -// -// 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 Licence 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. -// ============================================================================ - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_INTREQ_IRQHandler - .long SYSCTRL_INTREQ_IRQHandler - .long WDT_INTREQ_IRQHandler - .long RTC_INTREQ_IRQHandler - .long EIC_INTREQ_IRQHandler - .long NVMCTRL_INTREQ_IRQHandler - .long DMAC_INTREQ_IRQHandler - .long USB_INTREQ_IRQHandler - .long EVSYS_INTREQ_IRQHandler - .long SERCOM0_INTREQ_IRQHandler - .long SERCOM1_INTREQ_IRQHandler - .long SERCOM2_INTREQ_IRQHandler - .long SERCOM3_INTREQ_IRQHandler - .long SERCOM4_INTREQ_IRQHandler - .long SERCOM5_INTREQ_IRQHandler - .long TCC0_INTREQ_IRQHandler - .long TCC1_INTREQ_IRQHandler - .long TCC2_INTREQ_IRQHandler - .long TC3_INTREQ_IRQHandler - .long TC4_INTREQ_IRQHandler - .long TC5_INTREQ_IRQHandler - .long TC6_INTREQ_IRQHandler - .long TC7_INTREQ_IRQHandler - .long ADC_INTREQ_IRQHandler - .long AC_INTREQ_IRQHandler - .long DAC_INTREQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_INTREQ_IRQHandler - IRQ SYSCTRL_INTREQ_IRQHandler - IRQ WDT_INTREQ_IRQHandler - IRQ RTC_INTREQ_IRQHandler - IRQ EIC_INTREQ_IRQHandler - IRQ NVMCTRL_INTREQ_IRQHandler - IRQ DMAC_INTREQ_IRQHandler - IRQ USB_INTREQ_IRQHandler - IRQ EVSYS_INTREQ_IRQHandler - IRQ SERCOM0_INTREQ_IRQHandler - IRQ SERCOM1_INTREQ_IRQHandler - IRQ SERCOM2_INTREQ_IRQHandler - IRQ SERCOM3_INTREQ_IRQHandler - IRQ SERCOM4_INTREQ_IRQHandler - IRQ SERCOM5_INTREQ_IRQHandler - IRQ TCC0_INTREQ_IRQHandler - IRQ TCC1_INTREQ_IRQHandler - IRQ TCC2_INTREQ_IRQHandler - IRQ TC3_INTREQ_IRQHandler - IRQ TC4_INTREQ_IRQHandler - IRQ TC5_INTREQ_IRQHandler - IRQ TC6_INTREQ_IRQHandler - IRQ TC7_INTREQ_IRQHandler - IRQ ADC_INTREQ_IRQHandler - IRQ AC_INTREQ_IRQHandler - IRQ DAC_INTREQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamr21e18a.go b/device/sam/atsamr21e18a.go index af2083a..fe0af3d 100644 --- a/device/sam/atsamr21e18a.go +++ b/device/sam/atsamr21e18a.go @@ -27,7 +27,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_INTREQ_IRQHandler func interruptPM_INTREQ() { diff --git a/device/sam/atsamr21e18a.s b/device/sam/atsamr21e18a.s deleted file mode 100644 index 6a63313..0000000 --- a/device/sam/atsamr21e18a.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMR21E18A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAMR21E18A device: Cortex-M0+ Microcontroller with 256KB Flash, 32KB SRAM, 233-pin package (refer to http://www.atmel.com/devices/SAMR21E18A.aspx for more) -*/ - -// ============================================================================ -// Atmel Microcontroller Software Support -// ============================================================================ -// Copyright (c) 2016 Atmel Corporation, -// a wholly owned subsidiary of Microchip Technology Inc. -// -// 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 Licence 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. -// ============================================================================ - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_INTREQ_IRQHandler - .long SYSCTRL_INTREQ_IRQHandler - .long WDT_INTREQ_IRQHandler - .long RTC_INTREQ_IRQHandler - .long EIC_INTREQ_IRQHandler - .long NVMCTRL_INTREQ_IRQHandler - .long DMAC_INTREQ_IRQHandler - .long USB_INTREQ_IRQHandler - .long EVSYS_INTREQ_IRQHandler - .long SERCOM0_INTREQ_IRQHandler - .long SERCOM1_INTREQ_IRQHandler - .long SERCOM2_INTREQ_IRQHandler - .long SERCOM3_INTREQ_IRQHandler - .long SERCOM4_INTREQ_IRQHandler - .long SERCOM5_INTREQ_IRQHandler - .long TCC0_INTREQ_IRQHandler - .long TCC1_INTREQ_IRQHandler - .long TCC2_INTREQ_IRQHandler - .long TC3_INTREQ_IRQHandler - .long TC4_INTREQ_IRQHandler - .long TC5_INTREQ_IRQHandler - .long TC6_INTREQ_IRQHandler - .long TC7_INTREQ_IRQHandler - .long ADC_INTREQ_IRQHandler - .long AC_INTREQ_IRQHandler - .long DAC_INTREQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_INTREQ_IRQHandler - IRQ SYSCTRL_INTREQ_IRQHandler - IRQ WDT_INTREQ_IRQHandler - IRQ RTC_INTREQ_IRQHandler - IRQ EIC_INTREQ_IRQHandler - IRQ NVMCTRL_INTREQ_IRQHandler - IRQ DMAC_INTREQ_IRQHandler - IRQ USB_INTREQ_IRQHandler - IRQ EVSYS_INTREQ_IRQHandler - IRQ SERCOM0_INTREQ_IRQHandler - IRQ SERCOM1_INTREQ_IRQHandler - IRQ SERCOM2_INTREQ_IRQHandler - IRQ SERCOM3_INTREQ_IRQHandler - IRQ SERCOM4_INTREQ_IRQHandler - IRQ SERCOM5_INTREQ_IRQHandler - IRQ TCC0_INTREQ_IRQHandler - IRQ TCC1_INTREQ_IRQHandler - IRQ TCC2_INTREQ_IRQHandler - IRQ TC3_INTREQ_IRQHandler - IRQ TC4_INTREQ_IRQHandler - IRQ TC5_INTREQ_IRQHandler - IRQ TC6_INTREQ_IRQHandler - IRQ TC7_INTREQ_IRQHandler - IRQ ADC_INTREQ_IRQHandler - IRQ AC_INTREQ_IRQHandler - IRQ DAC_INTREQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamr21e19a.go b/device/sam/atsamr21e19a.go index 21f1931..87b16a8 100644 --- a/device/sam/atsamr21e19a.go +++ b/device/sam/atsamr21e19a.go @@ -27,7 +27,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_INTREQ_IRQHandler func interruptPM_INTREQ() { diff --git a/device/sam/atsamr21e19a.s b/device/sam/atsamr21e19a.s deleted file mode 100644 index faf9071..0000000 --- a/device/sam/atsamr21e19a.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMR21E19A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAMR21E19A device: Cortex-M0+ Microcontroller with 256KB Flash, 32KB SRAM, SIP48_RF233_FL512KB-pin package (refer to http://www.atmel.com/devices/SAMR21E19A.aspx for more) -*/ - -// ============================================================================ -// Atmel Microcontroller Software Support -// ============================================================================ -// Copyright (c) 2016 Atmel Corporation, -// a wholly owned subsidiary of Microchip Technology Inc. -// -// 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 Licence 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. -// ============================================================================ - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_INTREQ_IRQHandler - .long SYSCTRL_INTREQ_IRQHandler - .long WDT_INTREQ_IRQHandler - .long RTC_INTREQ_IRQHandler - .long EIC_INTREQ_IRQHandler - .long NVMCTRL_INTREQ_IRQHandler - .long DMAC_INTREQ_IRQHandler - .long USB_INTREQ_IRQHandler - .long EVSYS_INTREQ_IRQHandler - .long SERCOM0_INTREQ_IRQHandler - .long SERCOM1_INTREQ_IRQHandler - .long SERCOM2_INTREQ_IRQHandler - .long SERCOM3_INTREQ_IRQHandler - .long SERCOM4_INTREQ_IRQHandler - .long SERCOM5_INTREQ_IRQHandler - .long TCC0_INTREQ_IRQHandler - .long TCC1_INTREQ_IRQHandler - .long TCC2_INTREQ_IRQHandler - .long TC3_INTREQ_IRQHandler - .long TC4_INTREQ_IRQHandler - .long TC5_INTREQ_IRQHandler - .long TC6_INTREQ_IRQHandler - .long TC7_INTREQ_IRQHandler - .long ADC_INTREQ_IRQHandler - .long AC_INTREQ_IRQHandler - .long DAC_INTREQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_INTREQ_IRQHandler - IRQ SYSCTRL_INTREQ_IRQHandler - IRQ WDT_INTREQ_IRQHandler - IRQ RTC_INTREQ_IRQHandler - IRQ EIC_INTREQ_IRQHandler - IRQ NVMCTRL_INTREQ_IRQHandler - IRQ DMAC_INTREQ_IRQHandler - IRQ USB_INTREQ_IRQHandler - IRQ EVSYS_INTREQ_IRQHandler - IRQ SERCOM0_INTREQ_IRQHandler - IRQ SERCOM1_INTREQ_IRQHandler - IRQ SERCOM2_INTREQ_IRQHandler - IRQ SERCOM3_INTREQ_IRQHandler - IRQ SERCOM4_INTREQ_IRQHandler - IRQ SERCOM5_INTREQ_IRQHandler - IRQ TCC0_INTREQ_IRQHandler - IRQ TCC1_INTREQ_IRQHandler - IRQ TCC2_INTREQ_IRQHandler - IRQ TC3_INTREQ_IRQHandler - IRQ TC4_INTREQ_IRQHandler - IRQ TC5_INTREQ_IRQHandler - IRQ TC6_INTREQ_IRQHandler - IRQ TC7_INTREQ_IRQHandler - IRQ ADC_INTREQ_IRQHandler - IRQ AC_INTREQ_IRQHandler - IRQ DAC_INTREQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamr21g16a.go b/device/sam/atsamr21g16a.go index 81b8ac7..1202c58 100644 --- a/device/sam/atsamr21g16a.go +++ b/device/sam/atsamr21g16a.go @@ -27,7 +27,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_INTREQ_IRQHandler func interruptPM_INTREQ() { diff --git a/device/sam/atsamr21g16a.s b/device/sam/atsamr21g16a.s deleted file mode 100644 index e0a815a..0000000 --- a/device/sam/atsamr21g16a.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMR21G16A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAMR21G16A device: Cortex-M0+ Microcontroller with 64KB Flash, 16KB SRAM, 233-pin package (refer to http://www.atmel.com/devices/SAMR21G16A.aspx for more) -*/ - -// ============================================================================ -// Atmel Microcontroller Software Support -// ============================================================================ -// Copyright (c) 2016 Atmel Corporation, -// a wholly owned subsidiary of Microchip Technology Inc. -// -// 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 Licence 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. -// ============================================================================ - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_INTREQ_IRQHandler - .long SYSCTRL_INTREQ_IRQHandler - .long WDT_INTREQ_IRQHandler - .long RTC_INTREQ_IRQHandler - .long EIC_INTREQ_IRQHandler - .long NVMCTRL_INTREQ_IRQHandler - .long DMAC_INTREQ_IRQHandler - .long USB_INTREQ_IRQHandler - .long EVSYS_INTREQ_IRQHandler - .long SERCOM0_INTREQ_IRQHandler - .long SERCOM1_INTREQ_IRQHandler - .long SERCOM2_INTREQ_IRQHandler - .long SERCOM3_INTREQ_IRQHandler - .long SERCOM4_INTREQ_IRQHandler - .long SERCOM5_INTREQ_IRQHandler - .long TCC0_INTREQ_IRQHandler - .long TCC1_INTREQ_IRQHandler - .long TCC2_INTREQ_IRQHandler - .long TC3_INTREQ_IRQHandler - .long TC4_INTREQ_IRQHandler - .long TC5_INTREQ_IRQHandler - .long TC6_INTREQ_IRQHandler - .long TC7_INTREQ_IRQHandler - .long ADC_INTREQ_IRQHandler - .long AC_INTREQ_IRQHandler - .long DAC_INTREQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_INTREQ_IRQHandler - IRQ SYSCTRL_INTREQ_IRQHandler - IRQ WDT_INTREQ_IRQHandler - IRQ RTC_INTREQ_IRQHandler - IRQ EIC_INTREQ_IRQHandler - IRQ NVMCTRL_INTREQ_IRQHandler - IRQ DMAC_INTREQ_IRQHandler - IRQ USB_INTREQ_IRQHandler - IRQ EVSYS_INTREQ_IRQHandler - IRQ SERCOM0_INTREQ_IRQHandler - IRQ SERCOM1_INTREQ_IRQHandler - IRQ SERCOM2_INTREQ_IRQHandler - IRQ SERCOM3_INTREQ_IRQHandler - IRQ SERCOM4_INTREQ_IRQHandler - IRQ SERCOM5_INTREQ_IRQHandler - IRQ TCC0_INTREQ_IRQHandler - IRQ TCC1_INTREQ_IRQHandler - IRQ TCC2_INTREQ_IRQHandler - IRQ TC3_INTREQ_IRQHandler - IRQ TC4_INTREQ_IRQHandler - IRQ TC5_INTREQ_IRQHandler - IRQ TC6_INTREQ_IRQHandler - IRQ TC7_INTREQ_IRQHandler - IRQ ADC_INTREQ_IRQHandler - IRQ AC_INTREQ_IRQHandler - IRQ DAC_INTREQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamr21g17a.go b/device/sam/atsamr21g17a.go index 1759f47..fb44627 100644 --- a/device/sam/atsamr21g17a.go +++ b/device/sam/atsamr21g17a.go @@ -27,7 +27,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_INTREQ_IRQHandler func interruptPM_INTREQ() { diff --git a/device/sam/atsamr21g17a.s b/device/sam/atsamr21g17a.s deleted file mode 100644 index 87be1fc..0000000 --- a/device/sam/atsamr21g17a.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMR21G17A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAMR21G17A device: Cortex-M0+ Microcontroller with 128KB Flash, 32KB SRAM, 233-pin package (refer to http://www.atmel.com/devices/SAMR21G17A.aspx for more) -*/ - -// ============================================================================ -// Atmel Microcontroller Software Support -// ============================================================================ -// Copyright (c) 2016 Atmel Corporation, -// a wholly owned subsidiary of Microchip Technology Inc. -// -// 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 Licence 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. -// ============================================================================ - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_INTREQ_IRQHandler - .long SYSCTRL_INTREQ_IRQHandler - .long WDT_INTREQ_IRQHandler - .long RTC_INTREQ_IRQHandler - .long EIC_INTREQ_IRQHandler - .long NVMCTRL_INTREQ_IRQHandler - .long DMAC_INTREQ_IRQHandler - .long USB_INTREQ_IRQHandler - .long EVSYS_INTREQ_IRQHandler - .long SERCOM0_INTREQ_IRQHandler - .long SERCOM1_INTREQ_IRQHandler - .long SERCOM2_INTREQ_IRQHandler - .long SERCOM3_INTREQ_IRQHandler - .long SERCOM4_INTREQ_IRQHandler - .long SERCOM5_INTREQ_IRQHandler - .long TCC0_INTREQ_IRQHandler - .long TCC1_INTREQ_IRQHandler - .long TCC2_INTREQ_IRQHandler - .long TC3_INTREQ_IRQHandler - .long TC4_INTREQ_IRQHandler - .long TC5_INTREQ_IRQHandler - .long TC6_INTREQ_IRQHandler - .long TC7_INTREQ_IRQHandler - .long ADC_INTREQ_IRQHandler - .long AC_INTREQ_IRQHandler - .long DAC_INTREQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_INTREQ_IRQHandler - IRQ SYSCTRL_INTREQ_IRQHandler - IRQ WDT_INTREQ_IRQHandler - IRQ RTC_INTREQ_IRQHandler - IRQ EIC_INTREQ_IRQHandler - IRQ NVMCTRL_INTREQ_IRQHandler - IRQ DMAC_INTREQ_IRQHandler - IRQ USB_INTREQ_IRQHandler - IRQ EVSYS_INTREQ_IRQHandler - IRQ SERCOM0_INTREQ_IRQHandler - IRQ SERCOM1_INTREQ_IRQHandler - IRQ SERCOM2_INTREQ_IRQHandler - IRQ SERCOM3_INTREQ_IRQHandler - IRQ SERCOM4_INTREQ_IRQHandler - IRQ SERCOM5_INTREQ_IRQHandler - IRQ TCC0_INTREQ_IRQHandler - IRQ TCC1_INTREQ_IRQHandler - IRQ TCC2_INTREQ_IRQHandler - IRQ TC3_INTREQ_IRQHandler - IRQ TC4_INTREQ_IRQHandler - IRQ TC5_INTREQ_IRQHandler - IRQ TC6_INTREQ_IRQHandler - IRQ TC7_INTREQ_IRQHandler - IRQ ADC_INTREQ_IRQHandler - IRQ AC_INTREQ_IRQHandler - IRQ DAC_INTREQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamr21g18a.go b/device/sam/atsamr21g18a.go index 83a55a1..62c2ba0 100644 --- a/device/sam/atsamr21g18a.go +++ b/device/sam/atsamr21g18a.go @@ -27,7 +27,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -126,8 +126,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PM_INTREQ_IRQHandler func interruptPM_INTREQ() { diff --git a/device/sam/atsamr21g18a.s b/device/sam/atsamr21g18a.s deleted file mode 100644 index 51c2980..0000000 --- a/device/sam/atsamr21g18a.s +++ /dev/null @@ -1,136 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMR21G18A.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Atmel ATSAMR21G18A device: Cortex-M0+ Microcontroller with 256KB Flash, 32KB SRAM, 233-pin package (refer to http://www.atmel.com/devices/SAMR21G18A.aspx for more) -*/ - -// ============================================================================ -// Atmel Microcontroller Software Support -// ============================================================================ -// Copyright (c) 2016 Atmel Corporation, -// a wholly owned subsidiary of Microchip Technology Inc. -// -// 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 Licence 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. -// ============================================================================ - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long PM_INTREQ_IRQHandler - .long SYSCTRL_INTREQ_IRQHandler - .long WDT_INTREQ_IRQHandler - .long RTC_INTREQ_IRQHandler - .long EIC_INTREQ_IRQHandler - .long NVMCTRL_INTREQ_IRQHandler - .long DMAC_INTREQ_IRQHandler - .long USB_INTREQ_IRQHandler - .long EVSYS_INTREQ_IRQHandler - .long SERCOM0_INTREQ_IRQHandler - .long SERCOM1_INTREQ_IRQHandler - .long SERCOM2_INTREQ_IRQHandler - .long SERCOM3_INTREQ_IRQHandler - .long SERCOM4_INTREQ_IRQHandler - .long SERCOM5_INTREQ_IRQHandler - .long TCC0_INTREQ_IRQHandler - .long TCC1_INTREQ_IRQHandler - .long TCC2_INTREQ_IRQHandler - .long TC3_INTREQ_IRQHandler - .long TC4_INTREQ_IRQHandler - .long TC5_INTREQ_IRQHandler - .long TC6_INTREQ_IRQHandler - .long TC7_INTREQ_IRQHandler - .long ADC_INTREQ_IRQHandler - .long AC_INTREQ_IRQHandler - .long DAC_INTREQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PM_INTREQ_IRQHandler - IRQ SYSCTRL_INTREQ_IRQHandler - IRQ WDT_INTREQ_IRQHandler - IRQ RTC_INTREQ_IRQHandler - IRQ EIC_INTREQ_IRQHandler - IRQ NVMCTRL_INTREQ_IRQHandler - IRQ DMAC_INTREQ_IRQHandler - IRQ USB_INTREQ_IRQHandler - IRQ EVSYS_INTREQ_IRQHandler - IRQ SERCOM0_INTREQ_IRQHandler - IRQ SERCOM1_INTREQ_IRQHandler - IRQ SERCOM2_INTREQ_IRQHandler - IRQ SERCOM3_INTREQ_IRQHandler - IRQ SERCOM4_INTREQ_IRQHandler - IRQ SERCOM5_INTREQ_IRQHandler - IRQ TCC0_INTREQ_IRQHandler - IRQ TCC1_INTREQ_IRQHandler - IRQ TCC2_INTREQ_IRQHandler - IRQ TC3_INTREQ_IRQHandler - IRQ TC4_INTREQ_IRQHandler - IRQ TC5_INTREQ_IRQHandler - IRQ TC6_INTREQ_IRQHandler - IRQ TC7_INTREQ_IRQHandler - IRQ ADC_INTREQ_IRQHandler - IRQ AC_INTREQ_IRQHandler - IRQ DAC_INTREQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70j19.go b/device/sam/atsams70j19.go index 3c93a93..b87d2de 100644 --- a/device/sam/atsams70j19.go +++ b/device/sam/atsams70j19.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -152,8 +152,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70j19.s b/device/sam/atsams70j19.s deleted file mode 100644 index 33bad3a..0000000 --- a/device/sam/atsams70j19.s +++ /dev/null @@ -1,182 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70J19.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70J19 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70j19b.go b/device/sam/atsams70j19b.go index 036ae67..9a3008e 100644 --- a/device/sam/atsams70j19b.go +++ b/device/sam/atsams70j19b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -158,8 +158,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70j19b.s b/device/sam/atsams70j19b.s deleted file mode 100644 index b61a52a..0000000 --- a/device/sam/atsams70j19b.s +++ /dev/null @@ -1,184 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70J19B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70J19B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70j20.go b/device/sam/atsams70j20.go index 9f33820..a8c14c6 100644 --- a/device/sam/atsams70j20.go +++ b/device/sam/atsams70j20.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -152,8 +152,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70j20.s b/device/sam/atsams70j20.s deleted file mode 100644 index 4bdc9c7..0000000 --- a/device/sam/atsams70j20.s +++ /dev/null @@ -1,182 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70J20.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70J20 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70j20b.go b/device/sam/atsams70j20b.go index 89137dd..42b19b9 100644 --- a/device/sam/atsams70j20b.go +++ b/device/sam/atsams70j20b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -158,8 +158,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70j20b.s b/device/sam/atsams70j20b.s deleted file mode 100644 index 99e1e64..0000000 --- a/device/sam/atsams70j20b.s +++ /dev/null @@ -1,184 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70J20B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70J20B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70j21.go b/device/sam/atsams70j21.go index 5300c6c..266127d 100644 --- a/device/sam/atsams70j21.go +++ b/device/sam/atsams70j21.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -152,8 +152,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70j21.s b/device/sam/atsams70j21.s deleted file mode 100644 index b1d62e9..0000000 --- a/device/sam/atsams70j21.s +++ /dev/null @@ -1,182 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70J21.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70J21 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70j21b.go b/device/sam/atsams70j21b.go index 43f95dd..f6a1324 100644 --- a/device/sam/atsams70j21b.go +++ b/device/sam/atsams70j21b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -158,8 +158,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70j21b.s b/device/sam/atsams70j21b.s deleted file mode 100644 index 3bff36d..0000000 --- a/device/sam/atsams70j21b.s +++ /dev/null @@ -1,184 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70J21B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70J21B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70n19.go b/device/sam/atsams70n19.go index c0033ac..b18b6a1 100644 --- a/device/sam/atsams70n19.go +++ b/device/sam/atsams70n19.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -166,8 +166,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70n19.s b/device/sam/atsams70n19.s deleted file mode 100644 index 1c82b1d..0000000 --- a/device/sam/atsams70n19.s +++ /dev/null @@ -1,188 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70N19.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70N19 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70n19b.go b/device/sam/atsams70n19b.go index 3f47db5..216c07f 100644 --- a/device/sam/atsams70n19b.go +++ b/device/sam/atsams70n19b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -175,8 +175,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70n19b.s b/device/sam/atsams70n19b.s deleted file mode 100644 index 4a365d9..0000000 --- a/device/sam/atsams70n19b.s +++ /dev/null @@ -1,192 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70N19B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70N19B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - .long I2SC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70n20.go b/device/sam/atsams70n20.go index 0da99fc..dd398d1 100644 --- a/device/sam/atsams70n20.go +++ b/device/sam/atsams70n20.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -166,8 +166,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70n20.s b/device/sam/atsams70n20.s deleted file mode 100644 index 62f1ef3..0000000 --- a/device/sam/atsams70n20.s +++ /dev/null @@ -1,188 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70N20.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70N20 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70n20b.go b/device/sam/atsams70n20b.go index ff0c9c6..ba0b3ac 100644 --- a/device/sam/atsams70n20b.go +++ b/device/sam/atsams70n20b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -175,8 +175,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70n20b.s b/device/sam/atsams70n20b.s deleted file mode 100644 index 9af368d..0000000 --- a/device/sam/atsams70n20b.s +++ /dev/null @@ -1,192 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70N20B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70N20B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - .long I2SC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70n21.go b/device/sam/atsams70n21.go index 2f6c314..f3258ad 100644 --- a/device/sam/atsams70n21.go +++ b/device/sam/atsams70n21.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -166,8 +166,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70n21.s b/device/sam/atsams70n21.s deleted file mode 100644 index e3d1ff6..0000000 --- a/device/sam/atsams70n21.s +++ /dev/null @@ -1,188 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70N21.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70N21 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70n21b.go b/device/sam/atsams70n21b.go index 3d9bab7..d0a48fe 100644 --- a/device/sam/atsams70n21b.go +++ b/device/sam/atsams70n21b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -175,8 +175,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70n21b.s b/device/sam/atsams70n21b.s deleted file mode 100644 index 1a8aef5..0000000 --- a/device/sam/atsams70n21b.s +++ /dev/null @@ -1,192 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70N21B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70N21B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - .long I2SC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70q19.go b/device/sam/atsams70q19.go index 01220bf..bebaaa7 100644 --- a/device/sam/atsams70q19.go +++ b/device/sam/atsams70q19.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -175,8 +175,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70q19.s b/device/sam/atsams70q19.s deleted file mode 100644 index 381ef7b..0000000 --- a/device/sam/atsams70q19.s +++ /dev/null @@ -1,192 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70Q19.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70Q19 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70q19b.go b/device/sam/atsams70q19b.go index 061d00d..75d12e0 100644 --- a/device/sam/atsams70q19b.go +++ b/device/sam/atsams70q19b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -186,8 +186,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70q19b.s b/device/sam/atsams70q19b.s deleted file mode 100644 index b8f953a..0000000 --- a/device/sam/atsams70q19b.s +++ /dev/null @@ -1,198 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70Q19B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70Q19B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long I2SC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ I2SC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70q20.go b/device/sam/atsams70q20.go index 61579d3..263201d 100644 --- a/device/sam/atsams70q20.go +++ b/device/sam/atsams70q20.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -175,8 +175,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70q20.s b/device/sam/atsams70q20.s deleted file mode 100644 index 5effa0e..0000000 --- a/device/sam/atsams70q20.s +++ /dev/null @@ -1,192 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70Q20.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70Q20 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70q20b.go b/device/sam/atsams70q20b.go index d59058a..8a456ce 100644 --- a/device/sam/atsams70q20b.go +++ b/device/sam/atsams70q20b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -186,8 +186,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70q20b.s b/device/sam/atsams70q20b.s deleted file mode 100644 index f9471b5..0000000 --- a/device/sam/atsams70q20b.s +++ /dev/null @@ -1,198 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70Q20B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70Q20B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long I2SC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ I2SC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70q21.go b/device/sam/atsams70q21.go index bf9858b..e4a3dee 100644 --- a/device/sam/atsams70q21.go +++ b/device/sam/atsams70q21.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -175,8 +175,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70q21.s b/device/sam/atsams70q21.s deleted file mode 100644 index f1da785..0000000 --- a/device/sam/atsams70q21.s +++ /dev/null @@ -1,192 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70Q21.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70Q21 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsams70q21b.go b/device/sam/atsams70q21b.go index 268defa..f82d02e 100644 --- a/device/sam/atsams70q21b.go +++ b/device/sam/atsams70q21b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -186,8 +186,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsams70q21b.s b/device/sam/atsams70q21b.s deleted file mode 100644 index b5c39e5..0000000 --- a/device/sam/atsams70q21b.s +++ /dev/null @@ -1,198 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMS70Q21B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMS70Q21B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long I2SC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ I2SC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv70j19.go b/device/sam/atsamv70j19.go index 044aa42..d7ba1b0 100644 --- a/device/sam/atsamv70j19.go +++ b/device/sam/atsamv70j19.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -168,8 +168,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv70j19.s b/device/sam/atsamv70j19.s deleted file mode 100644 index f5e3a72..0000000 --- a/device/sam/atsamv70j19.s +++ /dev/null @@ -1,188 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV70J19.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV70J19 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long 0 - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv70j19b.go b/device/sam/atsamv70j19b.go index 6b0e43e..436e7b8 100644 --- a/device/sam/atsamv70j19b.go +++ b/device/sam/atsamv70j19b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -167,8 +167,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv70j19b.s b/device/sam/atsamv70j19b.s deleted file mode 100644 index c971cca..0000000 --- a/device/sam/atsamv70j19b.s +++ /dev/null @@ -1,187 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV70J19B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV70J19B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv70j20.go b/device/sam/atsamv70j20.go index 73dec82..74ad873 100644 --- a/device/sam/atsamv70j20.go +++ b/device/sam/atsamv70j20.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -164,8 +164,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv70j20.s b/device/sam/atsamv70j20.s deleted file mode 100644 index 0a7fde0..0000000 --- a/device/sam/atsamv70j20.s +++ /dev/null @@ -1,186 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV70J20.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV70J20 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv70j20b.go b/device/sam/atsamv70j20b.go index e09dc26..79bde85 100644 --- a/device/sam/atsamv70j20b.go +++ b/device/sam/atsamv70j20b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -167,8 +167,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv70j20b.s b/device/sam/atsamv70j20b.s deleted file mode 100644 index f147b65..0000000 --- a/device/sam/atsamv70j20b.s +++ /dev/null @@ -1,187 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV70J20B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV70J20B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv70n19.go b/device/sam/atsamv70n19.go index 621583f..e6bb9bc 100644 --- a/device/sam/atsamv70n19.go +++ b/device/sam/atsamv70n19.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -175,8 +175,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv70n19.s b/device/sam/atsamv70n19.s deleted file mode 100644 index 6b1d02f..0000000 --- a/device/sam/atsamv70n19.s +++ /dev/null @@ -1,191 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV70N19.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV70N19 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv70n19b.go b/device/sam/atsamv70n19b.go index 5c78ec5..c312083 100644 --- a/device/sam/atsamv70n19b.go +++ b/device/sam/atsamv70n19b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -188,8 +188,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv70n19b.s b/device/sam/atsamv70n19b.s deleted file mode 100644 index f34f1fc..0000000 --- a/device/sam/atsamv70n19b.s +++ /dev/null @@ -1,197 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV70N19B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV70N19B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - .long I2SC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv70n20.go b/device/sam/atsamv70n20.go index 7ebdc55..0f730cf 100644 --- a/device/sam/atsamv70n20.go +++ b/device/sam/atsamv70n20.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -179,8 +179,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv70n20.s b/device/sam/atsamv70n20.s deleted file mode 100644 index 931e4c6..0000000 --- a/device/sam/atsamv70n20.s +++ /dev/null @@ -1,193 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV70N20.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV70N20 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv70n20b.go b/device/sam/atsamv70n20b.go index a4e9eba..faadbe3 100644 --- a/device/sam/atsamv70n20b.go +++ b/device/sam/atsamv70n20b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -188,8 +188,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv70n20b.s b/device/sam/atsamv70n20b.s deleted file mode 100644 index 578232f..0000000 --- a/device/sam/atsamv70n20b.s +++ /dev/null @@ -1,197 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV70N20B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV70N20B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - .long I2SC0_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv70q19.go b/device/sam/atsamv70q19.go index edbb1d5..882fad6 100644 --- a/device/sam/atsamv70q19.go +++ b/device/sam/atsamv70q19.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -188,8 +188,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv70q19.s b/device/sam/atsamv70q19.s deleted file mode 100644 index 1609d13..0000000 --- a/device/sam/atsamv70q19.s +++ /dev/null @@ -1,197 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV70Q19.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV70Q19 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv70q19b.go b/device/sam/atsamv70q19b.go index 2cfda75..0020da1 100644 --- a/device/sam/atsamv70q19b.go +++ b/device/sam/atsamv70q19b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -199,8 +199,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv70q19b.s b/device/sam/atsamv70q19b.s deleted file mode 100644 index c861ec1..0000000 --- a/device/sam/atsamv70q19b.s +++ /dev/null @@ -1,203 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV70Q19B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV70Q19B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long I2SC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ I2SC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv70q20.go b/device/sam/atsamv70q20.go index d595e42..7314901 100644 --- a/device/sam/atsamv70q20.go +++ b/device/sam/atsamv70q20.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -188,8 +188,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv70q20.s b/device/sam/atsamv70q20.s deleted file mode 100644 index efb0497..0000000 --- a/device/sam/atsamv70q20.s +++ /dev/null @@ -1,197 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV70Q20.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV70Q20 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv70q20b.go b/device/sam/atsamv70q20b.go index ae897f6..c0f8902 100644 --- a/device/sam/atsamv70q20b.go +++ b/device/sam/atsamv70q20b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -199,8 +199,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv70q20b.s b/device/sam/atsamv70q20b.s deleted file mode 100644 index a7094d1..0000000 --- a/device/sam/atsamv70q20b.s +++ /dev/null @@ -1,203 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV70Q20B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV70Q20B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long 0 - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long 0 - .long 0 - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long I2SC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ I2SC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71j19.go b/device/sam/atsamv71j19.go index 58b85d7..6c76383 100644 --- a/device/sam/atsamv71j19.go +++ b/device/sam/atsamv71j19.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -170,8 +170,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71j19.s b/device/sam/atsamv71j19.s deleted file mode 100644 index daa8401..0000000 --- a/device/sam/atsamv71j19.s +++ /dev/null @@ -1,188 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71J19.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71J19 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long 0 - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71j19b.go b/device/sam/atsamv71j19b.go index a314187..3687ecd 100644 --- a/device/sam/atsamv71j19b.go +++ b/device/sam/atsamv71j19b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -185,8 +185,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71j19b.s b/device/sam/atsamv71j19b.s deleted file mode 100644 index b5fc90d..0000000 --- a/device/sam/atsamv71j19b.s +++ /dev/null @@ -1,198 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71J19B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71J19B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long 0 - .long 0 - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71j20.go b/device/sam/atsamv71j20.go index b25c45e..001b769 100644 --- a/device/sam/atsamv71j20.go +++ b/device/sam/atsamv71j20.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -173,8 +173,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71j20.s b/device/sam/atsamv71j20.s deleted file mode 100644 index 1329fb9..0000000 --- a/device/sam/atsamv71j20.s +++ /dev/null @@ -1,189 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71J20.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71J20 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71j20b.go b/device/sam/atsamv71j20b.go index 7d52919..d6c216b 100644 --- a/device/sam/atsamv71j20b.go +++ b/device/sam/atsamv71j20b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -185,8 +185,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71j20b.s b/device/sam/atsamv71j20b.s deleted file mode 100644 index 6d6b747..0000000 --- a/device/sam/atsamv71j20b.s +++ /dev/null @@ -1,198 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71J20B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71J20B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long 0 - .long 0 - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71j21.go b/device/sam/atsamv71j21.go index f991142..f116c14 100644 --- a/device/sam/atsamv71j21.go +++ b/device/sam/atsamv71j21.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -173,8 +173,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71j21.s b/device/sam/atsamv71j21.s deleted file mode 100644 index d886ec1..0000000 --- a/device/sam/atsamv71j21.s +++ /dev/null @@ -1,189 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71J21.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71J21 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71j21b.go b/device/sam/atsamv71j21b.go index 73be84b..8320bab 100644 --- a/device/sam/atsamv71j21b.go +++ b/device/sam/atsamv71j21b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -185,8 +185,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71j21b.s b/device/sam/atsamv71j21b.s deleted file mode 100644 index 9c8d487..0000000 --- a/device/sam/atsamv71j21b.s +++ /dev/null @@ -1,198 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71J21B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71J21B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long 0 - .long PIOD_IRQHandler - .long 0 - .long 0 - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long 0 - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long 0 - .long 0 - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long 0 - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long 0 - .long 0 - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long 0 - .long 0 - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ PIOD_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71n19.go b/device/sam/atsamv71n19.go index b00b57b..2bb85ab 100644 --- a/device/sam/atsamv71n19.go +++ b/device/sam/atsamv71n19.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -188,8 +188,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71n19.s b/device/sam/atsamv71n19.s deleted file mode 100644 index 770388d..0000000 --- a/device/sam/atsamv71n19.s +++ /dev/null @@ -1,196 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71N19.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71N19 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71n19b.go b/device/sam/atsamv71n19b.go index 14c623c..f8b6559 100644 --- a/device/sam/atsamv71n19b.go +++ b/device/sam/atsamv71n19b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -206,8 +206,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71n19b.s b/device/sam/atsamv71n19b.s deleted file mode 100644 index 1a075a9..0000000 --- a/device/sam/atsamv71n19b.s +++ /dev/null @@ -1,207 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71N19B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71N19B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long 0 - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71n20.go b/device/sam/atsamv71n20.go index d6aa7a9..f5175ea 100644 --- a/device/sam/atsamv71n20.go +++ b/device/sam/atsamv71n20.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -185,8 +185,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71n20.s b/device/sam/atsamv71n20.s deleted file mode 100644 index cf5bbed..0000000 --- a/device/sam/atsamv71n20.s +++ /dev/null @@ -1,195 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71N20.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71N20 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long 0 - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71n20b.go b/device/sam/atsamv71n20b.go index e667221..d4c591b 100644 --- a/device/sam/atsamv71n20b.go +++ b/device/sam/atsamv71n20b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -206,8 +206,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71n20b.s b/device/sam/atsamv71n20b.s deleted file mode 100644 index 225f66f..0000000 --- a/device/sam/atsamv71n20b.s +++ /dev/null @@ -1,207 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71N20B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71N20B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long 0 - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71n21.go b/device/sam/atsamv71n21.go index 56bcf8c..cff489e 100644 --- a/device/sam/atsamv71n21.go +++ b/device/sam/atsamv71n21.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -185,8 +185,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71n21.s b/device/sam/atsamv71n21.s deleted file mode 100644 index ee535cb..0000000 --- a/device/sam/atsamv71n21.s +++ /dev/null @@ -1,195 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71N21.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71N21 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long 0 - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71n21b.go b/device/sam/atsamv71n21b.go index bbda34b..ff512c0 100644 --- a/device/sam/atsamv71n21b.go +++ b/device/sam/atsamv71n21b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -206,8 +206,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71n21b.s b/device/sam/atsamv71n21b.s deleted file mode 100644 index 22bf0f3..0000000 --- a/device/sam/atsamv71n21b.s +++ /dev/null @@ -1,207 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71N21B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71N21B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long 0 - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long 0 - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long 0 - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long 0 - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long 0 - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71q19.go b/device/sam/atsamv71q19.go index a7b7459..045fa39 100644 --- a/device/sam/atsamv71q19.go +++ b/device/sam/atsamv71q19.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -197,8 +197,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71q19.s b/device/sam/atsamv71q19.s deleted file mode 100644 index 38a8db1..0000000 --- a/device/sam/atsamv71q19.s +++ /dev/null @@ -1,200 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71Q19.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71Q19 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71q19b.go b/device/sam/atsamv71q19b.go index 75e0ed5..faca24e 100644 --- a/device/sam/atsamv71q19b.go +++ b/device/sam/atsamv71q19b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -217,8 +217,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71q19b.s b/device/sam/atsamv71q19b.s deleted file mode 100644 index b219872..0000000 --- a/device/sam/atsamv71q19b.s +++ /dev/null @@ -1,212 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71Q19B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71Q19B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long I2SC1_IRQHandler - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ I2SC1_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71q20.go b/device/sam/atsamv71q20.go index 7536231..b85a260 100644 --- a/device/sam/atsamv71q20.go +++ b/device/sam/atsamv71q20.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -197,8 +197,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71q20.s b/device/sam/atsamv71q20.s deleted file mode 100644 index 2c35193..0000000 --- a/device/sam/atsamv71q20.s +++ /dev/null @@ -1,200 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71Q20.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71Q20 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71q20b.go b/device/sam/atsamv71q20b.go index 1a3cd35..163e4e3 100644 --- a/device/sam/atsamv71q20b.go +++ b/device/sam/atsamv71q20b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -217,8 +217,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71q20b.s b/device/sam/atsamv71q20b.s deleted file mode 100644 index 1ac4121..0000000 --- a/device/sam/atsamv71q20b.s +++ /dev/null @@ -1,212 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71Q20B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71Q20B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long I2SC1_IRQHandler - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ I2SC1_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71q21.go b/device/sam/atsamv71q21.go index 4effcd0..cf1936a 100644 --- a/device/sam/atsamv71q21.go +++ b/device/sam/atsamv71q21.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -197,8 +197,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71q21.s b/device/sam/atsamv71q21.s deleted file mode 100644 index 85068d3..0000000 --- a/device/sam/atsamv71q21.s +++ /dev/null @@ -1,200 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71Q21.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71Q21 Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long 0 - .long 0 - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sam/atsamv71q21b.go b/device/sam/atsamv71q21b.go index 0d09e5c..b4a91f3 100644 --- a/device/sam/atsamv71q21b.go +++ b/device/sam/atsamv71q21b.go @@ -10,7 +10,7 @@ package sam import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -217,8 +217,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export SUPC_IRQHandler func interruptSUPC() { diff --git a/device/sam/atsamv71q21b.s b/device/sam/atsamv71q21b.s deleted file mode 100644 index c0db623..0000000 --- a/device/sam/atsamv71q21b.s +++ /dev/null @@ -1,212 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from ATSAMV71Q21B.svd, see https://github.com/posborne/cmsis-svd/tree/master/data/Atmel - -/* -// Microchip ATSAMV71Q21B Microcontroller -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long SUPC_IRQHandler - .long RSTC_IRQHandler - .long RTC_IRQHandler - .long RTT_IRQHandler - .long WDT_IRQHandler - .long PMC_IRQHandler - .long EFC_IRQHandler - .long UART0_IRQHandler - .long UART1_IRQHandler - .long 0 - .long PIOA_IRQHandler - .long PIOB_IRQHandler - .long PIOC_IRQHandler - .long USART0_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long PIOD_IRQHandler - .long PIOE_IRQHandler - .long HSMCI_IRQHandler - .long TWIHS0_IRQHandler - .long TWIHS1_IRQHandler - .long SPI0_IRQHandler - .long SSC_IRQHandler - .long TC0_IRQHandler - .long TC1_IRQHandler - .long TC2_IRQHandler - .long TC3_IRQHandler - .long TC4_IRQHandler - .long TC5_IRQHandler - .long AFEC0_IRQHandler - .long DACC_IRQHandler - .long PWM0_IRQHandler - .long ICM_IRQHandler - .long ACC_IRQHandler - .long USBHS_IRQHandler - .long MCAN0_INT0_IRQHandler - .long MCAN0_INT1_IRQHandler - .long MCAN1_INT0_IRQHandler - .long MCAN1_INT1_IRQHandler - .long GMAC_IRQHandler - .long AFEC1_IRQHandler - .long TWIHS2_IRQHandler - .long SPI1_IRQHandler - .long QSPI_IRQHandler - .long UART2_IRQHandler - .long UART3_IRQHandler - .long UART4_IRQHandler - .long TC6_IRQHandler - .long TC7_IRQHandler - .long TC8_IRQHandler - .long TC9_IRQHandler - .long TC10_IRQHandler - .long TC11_IRQHandler - .long MLB_IRQHandler - .long 0 - .long 0 - .long AES_IRQHandler - .long TRNG_IRQHandler - .long XDMAC_IRQHandler - .long ISI_IRQHandler - .long PWM1_IRQHandler - .long FPU_IRQHandler - .long SDRAMC_IRQHandler - .long RSWDT_IRQHandler - .long CCW_IRQHandler - .long CCF_IRQHandler - .long GMAC_Q1_IRQHandler - .long GMAC_Q2_IRQHandler - .long IXC_IRQHandler - .long I2SC0_IRQHandler - .long I2SC1_IRQHandler - .long GMAC_Q3_IRQHandler - .long GMAC_Q4_IRQHandler - .long GMAC_Q5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ SUPC_IRQHandler - IRQ RSTC_IRQHandler - IRQ RTC_IRQHandler - IRQ RTT_IRQHandler - IRQ WDT_IRQHandler - IRQ PMC_IRQHandler - IRQ EFC_IRQHandler - IRQ UART0_IRQHandler - IRQ UART1_IRQHandler - IRQ PIOA_IRQHandler - IRQ PIOB_IRQHandler - IRQ PIOC_IRQHandler - IRQ USART0_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ PIOD_IRQHandler - IRQ PIOE_IRQHandler - IRQ HSMCI_IRQHandler - IRQ TWIHS0_IRQHandler - IRQ TWIHS1_IRQHandler - IRQ SPI0_IRQHandler - IRQ SSC_IRQHandler - IRQ TC0_IRQHandler - IRQ TC1_IRQHandler - IRQ TC2_IRQHandler - IRQ TC3_IRQHandler - IRQ TC4_IRQHandler - IRQ TC5_IRQHandler - IRQ AFEC0_IRQHandler - IRQ DACC_IRQHandler - IRQ PWM0_IRQHandler - IRQ ICM_IRQHandler - IRQ ACC_IRQHandler - IRQ USBHS_IRQHandler - IRQ MCAN0_INT0_IRQHandler - IRQ MCAN0_INT1_IRQHandler - IRQ MCAN1_INT0_IRQHandler - IRQ MCAN1_INT1_IRQHandler - IRQ GMAC_IRQHandler - IRQ AFEC1_IRQHandler - IRQ TWIHS2_IRQHandler - IRQ SPI1_IRQHandler - IRQ QSPI_IRQHandler - IRQ UART2_IRQHandler - IRQ UART3_IRQHandler - IRQ UART4_IRQHandler - IRQ TC6_IRQHandler - IRQ TC7_IRQHandler - IRQ TC8_IRQHandler - IRQ TC9_IRQHandler - IRQ TC10_IRQHandler - IRQ TC11_IRQHandler - IRQ MLB_IRQHandler - IRQ AES_IRQHandler - IRQ TRNG_IRQHandler - IRQ XDMAC_IRQHandler - IRQ ISI_IRQHandler - IRQ PWM1_IRQHandler - IRQ FPU_IRQHandler - IRQ SDRAMC_IRQHandler - IRQ RSWDT_IRQHandler - IRQ CCW_IRQHandler - IRQ CCF_IRQHandler - IRQ GMAC_Q1_IRQHandler - IRQ GMAC_Q2_IRQHandler - IRQ IXC_IRQHandler - IRQ I2SC0_IRQHandler - IRQ I2SC1_IRQHandler - IRQ GMAC_Q3_IRQHandler - IRQ GMAC_Q4_IRQHandler - IRQ GMAC_Q5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/sifive/fe310.go b/device/sifive/fe310.go index 848638d..35ef63a 100644 --- a/device/sifive/fe310.go +++ b/device/sifive/fe310.go @@ -10,7 +10,7 @@ package sifive import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -173,8 +173,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { case IRQ_WATCHDOG: diff --git a/device/sifive/fu540.go b/device/sifive/fu540.go index e8f9a53..547be72 100644 --- a/device/sifive/fu540.go +++ b/device/sifive/fu540.go @@ -10,7 +10,7 @@ package sifive import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -28,8 +28,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { } diff --git a/device/sifive/sifive_hifive_unmatched_a00.go b/device/sifive/sifive_hifive_unmatched_a00.go index e8d7997..d04683b 100644 --- a/device/sifive/sifive_hifive_unmatched_a00.go +++ b/device/sifive/sifive_hifive_unmatched_a00.go @@ -10,7 +10,7 @@ package sifive import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -28,8 +28,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} func HandleInterrupt(num int) { switch num { } diff --git a/device/stm32/stm32f0x0.go b/device/stm32/stm32f0x0.go index 7f60ee5..e8cf1dd 100644 --- a/device/stm32/stm32f0x0.go +++ b/device/stm32/stm32f0x0.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -110,8 +110,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f0x0.s b/device/stm32/stm32f0x0.s deleted file mode 100644 index bb10c64..0000000 --- a/device/stm32/stm32f0x0.s +++ /dev/null @@ -1,127 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f0x0.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F0x0 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long 0 - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_3_IRQHandler - .long DMA1_CH4_5_IRQHandler - .long ADC_IRQHandler - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long 0 - .long TIM3_IRQHandler - .long TIM6_IRQHandler - .long 0 - .long TIM14_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_4_5_6_IRQHandler - .long 0 - .long USB_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_3_IRQHandler - IRQ DMA1_CH4_5_IRQHandler - IRQ ADC_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM6_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_4_5_6_IRQHandler - IRQ USB_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f0x1.go b/device/stm32/stm32f0x1.go index e315191..78b90ea 100644 --- a/device/stm32/stm32f0x1.go +++ b/device/stm32/stm32f0x1.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -119,8 +119,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f0x1.s b/device/stm32/stm32f0x1.s deleted file mode 100644 index ffa61c0..0000000 --- a/device/stm32/stm32f0x1.s +++ /dev/null @@ -1,131 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f0x1.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F0x1 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_IRQHandler - .long FLASH_IRQHandler - .long RCC_CRS_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long TSC_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_3_DMA2_CH1_2_IRQHandler - .long DMA1_CH4_5_6_7_DMA2_CH3_4_5_IRQHandler - .long ADC_COMP_IRQHandler - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long TIM14_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_4_5_6_7_8_IRQHandler - .long CEC_CAN_IRQHandler - .long USB_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_CRS_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ TSC_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_3_DMA2_CH1_2_IRQHandler - IRQ DMA1_CH4_5_6_7_DMA2_CH3_4_5_IRQHandler - IRQ ADC_COMP_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_4_5_6_7_8_IRQHandler - IRQ CEC_CAN_IRQHandler - IRQ USB_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f0x2.go b/device/stm32/stm32f0x2.go index df53399..c3972c4 100644 --- a/device/stm32/stm32f0x2.go +++ b/device/stm32/stm32f0x2.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -121,8 +121,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f0x2.s b/device/stm32/stm32f0x2.s deleted file mode 100644 index 4147185..0000000 --- a/device/stm32/stm32f0x2.s +++ /dev/null @@ -1,131 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f0x2.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F0x2 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_IRQHandler - .long FLASH_IRQHandler - .long RCC_CRS_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long TSC_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_3_IRQHandler - .long DMA1_CH4_5_6_7_IRQHandler - .long ADC_COMP_IRQHandler - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long TIM14_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_4_IRQHandler - .long CEC_CAN_IRQHandler - .long USB_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_CRS_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ TSC_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_3_IRQHandler - IRQ DMA1_CH4_5_6_7_IRQHandler - IRQ ADC_COMP_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_4_IRQHandler - IRQ CEC_CAN_IRQHandler - IRQ USB_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f0x8.go b/device/stm32/stm32f0x8.go index eba4a35..a04d313 100644 --- a/device/stm32/stm32f0x8.go +++ b/device/stm32/stm32f0x8.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -119,8 +119,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f0x8.s b/device/stm32/stm32f0x8.s deleted file mode 100644 index 8963850..0000000 --- a/device/stm32/stm32f0x8.s +++ /dev/null @@ -1,131 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f0x8.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F0x8 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_IRQHandler - .long FLASH_IRQHandler - .long RCC_CRS_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long TSC_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_3_DMA2_CH1_2_IRQHandler - .long DMA1_CH4_5_6_7_DMA2_CH3_4_5_IRQHandler - .long ADC_COMP_IRQHandler - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long TIM14_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_4_5_6_7_8_IRQHandler - .long CEC_CAN_IRQHandler - .long USB_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_CRS_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ TSC_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_3_DMA2_CH1_2_IRQHandler - IRQ DMA1_CH4_5_6_7_DMA2_CH3_4_5_IRQHandler - IRQ ADC_COMP_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_4_5_6_7_8_IRQHandler - IRQ CEC_CAN_IRQHandler - IRQ USB_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f100.go b/device/stm32/stm32f100.go index 77a4a90..859de8a 100644 --- a/device/stm32/stm32f100.go +++ b/device/stm32/stm32f100.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -174,8 +174,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f100.s b/device/stm32/stm32f100.s deleted file mode 100644 index 4f9a95b..0000000 --- a/device/stm32/stm32f100.s +++ /dev/null @@ -1,180 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f100.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F100 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMPER_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Channel1_IRQHandler - .long DMA1_Channel2_IRQHandler - .long DMA1_Channel3_IRQHandler - .long DMA1_Channel4_IRQHandler - .long DMA1_Channel5_IRQHandler - .long DMA1_Channel6_IRQHandler - .long DMA1_Channel7_IRQHandler - .long ADC_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_TIM17_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTCAlarm_IRQHandler - .long CEC_IRQHandler - .long TIM12_IRQHandler - .long TIM13_IRQHandler - .long TIM14_IRQHandler - .long 0 - .long 0 - .long FSMC_IRQHandler - .long 0 - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Channel1_IRQHandler - .long DMA2_Channel2_IRQHandler - .long DMA2_Channel3_IRQHandler - .long DMA2_Channel4_5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMPER_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Channel1_IRQHandler - IRQ DMA1_Channel2_IRQHandler - IRQ DMA1_Channel3_IRQHandler - IRQ DMA1_Channel4_IRQHandler - IRQ DMA1_Channel5_IRQHandler - IRQ DMA1_Channel6_IRQHandler - IRQ DMA1_Channel7_IRQHandler - IRQ ADC_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_TIM17_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTCAlarm_IRQHandler - IRQ CEC_IRQHandler - IRQ TIM12_IRQHandler - IRQ TIM13_IRQHandler - IRQ TIM14_IRQHandler - IRQ FSMC_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Channel1_IRQHandler - IRQ DMA2_Channel2_IRQHandler - IRQ DMA2_Channel3_IRQHandler - IRQ DMA2_Channel4_5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f101.go b/device/stm32/stm32f101.go index 8e99b25..52d8056 100644 --- a/device/stm32/stm32f101.go +++ b/device/stm32/stm32f101.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -193,8 +193,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f101.s b/device/stm32/stm32f101.s deleted file mode 100644 index 92a1218..0000000 --- a/device/stm32/stm32f101.s +++ /dev/null @@ -1,187 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f101.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F101 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMPER_IRQHandler - .long RTC_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Channel1_IRQHandler - .long DMA1_Channel2_IRQHandler - .long DMA1_Channel3_IRQHandler - .long DMA1_Channel4_IRQHandler - .long DMA1_Channel5_IRQHandler - .long DMA1_Channel6_IRQHandler - .long DMA1_Channel7_IRQHandler - .long ADC1_2_IRQHandler - .long USB_HP_CAN_TX_IRQHandler - .long USB_LP_CAN_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_IRQHandler - .long TIM1_UP_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long USBWakeup_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long FSMC_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_Channel4_5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMPER_IRQHandler - IRQ RTC_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Channel1_IRQHandler - IRQ DMA1_Channel2_IRQHandler - IRQ DMA1_Channel3_IRQHandler - IRQ DMA1_Channel4_IRQHandler - IRQ DMA1_Channel5_IRQHandler - IRQ DMA1_Channel6_IRQHandler - IRQ DMA1_Channel7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_CAN_TX_IRQHandler - IRQ USB_LP_CAN_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_IRQHandler - IRQ TIM1_UP_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ USBWakeup_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ FSMC_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_Channel4_5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f102.go b/device/stm32/stm32f102.go index af22392..d82700d 100644 --- a/device/stm32/stm32f102.go +++ b/device/stm32/stm32f102.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -191,8 +191,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f102.s b/device/stm32/stm32f102.s deleted file mode 100644 index 59c12ca..0000000 --- a/device/stm32/stm32f102.s +++ /dev/null @@ -1,187 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f102.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F102 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMPER_IRQHandler - .long RTC_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Channel1_IRQHandler - .long DMA1_Channel2_IRQHandler - .long DMA1_Channel3_IRQHandler - .long DMA1_Channel4_IRQHandler - .long DMA1_Channel5_IRQHandler - .long DMA1_Channel6_IRQHandler - .long DMA1_Channel7_IRQHandler - .long ADC1_2_IRQHandler - .long USB_HP_CAN_TX_IRQHandler - .long USB_LP_CAN_RX0_IRQHandler - .long CAN_RX1_IRQHandler - .long CAN_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_IRQHandler - .long TIM1_UP_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTCAlarm_IRQHandler - .long USBWakeup_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long FSMC_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Channel1_IRQHandler - .long DMA2_Channel2_IRQHandler - .long DMA2_Channel3_IRQHandler - .long DMA2_Channel4_5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMPER_IRQHandler - IRQ RTC_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Channel1_IRQHandler - IRQ DMA1_Channel2_IRQHandler - IRQ DMA1_Channel3_IRQHandler - IRQ DMA1_Channel4_IRQHandler - IRQ DMA1_Channel5_IRQHandler - IRQ DMA1_Channel6_IRQHandler - IRQ DMA1_Channel7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_CAN_TX_IRQHandler - IRQ USB_LP_CAN_RX0_IRQHandler - IRQ CAN_RX1_IRQHandler - IRQ CAN_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_IRQHandler - IRQ TIM1_UP_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTCAlarm_IRQHandler - IRQ USBWakeup_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ FSMC_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Channel1_IRQHandler - IRQ DMA2_Channel2_IRQHandler - IRQ DMA2_Channel3_IRQHandler - IRQ DMA2_Channel4_5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f103.go b/device/stm32/stm32f103.go index e5abced..dc4bc7f 100644 --- a/device/stm32/stm32f103.go +++ b/device/stm32/stm32f103.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -188,8 +188,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f103.s b/device/stm32/stm32f103.s deleted file mode 100644 index a99aaca..0000000 --- a/device/stm32/stm32f103.s +++ /dev/null @@ -1,186 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f103.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F103 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMPER_IRQHandler - .long RTC_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Channel1_IRQHandler - .long DMA1_Channel2_IRQHandler - .long DMA1_Channel3_IRQHandler - .long DMA1_Channel4_IRQHandler - .long DMA1_Channel5_IRQHandler - .long DMA1_Channel6_IRQHandler - .long DMA1_Channel7_IRQHandler - .long ADC1_2_IRQHandler - .long USB_HP_CAN_TX_IRQHandler - .long USB_LP_CAN_RX0_IRQHandler - .long CAN_RX1_IRQHandler - .long CAN_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_IRQHandler - .long TIM1_UP_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTCAlarm_IRQHandler - .long 0 - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long FSMC_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Channel1_IRQHandler - .long DMA2_Channel2_IRQHandler - .long DMA2_Channel3_IRQHandler - .long DMA2_Channel4_5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMPER_IRQHandler - IRQ RTC_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Channel1_IRQHandler - IRQ DMA1_Channel2_IRQHandler - IRQ DMA1_Channel3_IRQHandler - IRQ DMA1_Channel4_IRQHandler - IRQ DMA1_Channel5_IRQHandler - IRQ DMA1_Channel6_IRQHandler - IRQ DMA1_Channel7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_CAN_TX_IRQHandler - IRQ USB_LP_CAN_RX0_IRQHandler - IRQ CAN_RX1_IRQHandler - IRQ CAN_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_IRQHandler - IRQ TIM1_UP_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTCAlarm_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ FSMC_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Channel1_IRQHandler - IRQ DMA2_Channel2_IRQHandler - IRQ DMA2_Channel3_IRQHandler - IRQ DMA2_Channel4_5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f107.go b/device/stm32/stm32f107.go index 99a07d1..9a9d928 100644 --- a/device/stm32/stm32f107.go +++ b/device/stm32/stm32f107.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -218,8 +218,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f107.s b/device/stm32/stm32f107.s deleted file mode 100644 index e4821bd..0000000 --- a/device/stm32/stm32f107.s +++ /dev/null @@ -1,203 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f107.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F107 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMPER_IRQHandler - .long RTC_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Channel1_IRQHandler - .long DMA1_Channel2_IRQHandler - .long DMA1_Channel3_IRQHandler - .long DMA1_Channel4_IRQHandler - .long DMA1_Channel5_IRQHandler - .long DMA1_Channel6_IRQHandler - .long DMA1_Channel7_IRQHandler - .long ADC1_2_IRQHandler - .long USB_HP_CAN_TX_IRQHandler - .long USB_LP_CAN_RX0_IRQHandler - .long CAN_RX1_IRQHandler - .long CAN_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_IRQHandler - .long TIM1_UP_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTCAlarm_IRQHandler - .long USBWakeup_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long FSMC_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Channel1_IRQHandler - .long DMA2_Channel2_IRQHandler - .long DMA2_Channel3_IRQHandler - .long DMA2_Channel4_IRQHandler - .long DMA2_Channel5_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMPER_IRQHandler - IRQ RTC_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Channel1_IRQHandler - IRQ DMA1_Channel2_IRQHandler - IRQ DMA1_Channel3_IRQHandler - IRQ DMA1_Channel4_IRQHandler - IRQ DMA1_Channel5_IRQHandler - IRQ DMA1_Channel6_IRQHandler - IRQ DMA1_Channel7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_CAN_TX_IRQHandler - IRQ USB_LP_CAN_RX0_IRQHandler - IRQ CAN_RX1_IRQHandler - IRQ CAN_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_IRQHandler - IRQ TIM1_UP_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTCAlarm_IRQHandler - IRQ USBWakeup_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ FSMC_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Channel1_IRQHandler - IRQ DMA2_Channel2_IRQHandler - IRQ DMA2_Channel3_IRQHandler - IRQ DMA2_Channel4_IRQHandler - IRQ DMA2_Channel5_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f215.go b/device/stm32/stm32f215.go index 4656b19..9b5973c 100644 --- a/device/stm32/stm32f215.go +++ b/device/stm32/stm32f215.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -246,8 +246,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f215.s b/device/stm32/stm32f215.s deleted file mode 100644 index f11ed7a..0000000 --- a/device/stm32/stm32f215.s +++ /dev/null @@ -1,229 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f215.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F215 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FSMC_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FSMC_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f217.go b/device/stm32/stm32f217.go index 9213c24..7534e01 100644 --- a/device/stm32/stm32f217.go +++ b/device/stm32/stm32f217.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -246,8 +246,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f217.s b/device/stm32/stm32f217.s deleted file mode 100644 index e88e082..0000000 --- a/device/stm32/stm32f217.s +++ /dev/null @@ -1,229 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f217.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F217 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FSMC_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FSMC_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f301.go b/device/stm32/stm32f301.go index d469480..2fa4b3d 100644 --- a/device/stm32/stm32f301.go +++ b/device/stm32/stm32f301.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -209,8 +209,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQ_IRQHandler func interruptWWDG_IRQ() { diff --git a/device/stm32/stm32f301.s b/device/stm32/stm32f301.s deleted file mode 100644 index 2c791fb..0000000 --- a/device/stm32/stm32f301.s +++ /dev/null @@ -1,213 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f301.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F301 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQ_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQ_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_TSC_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_IRQ_IRQHandler - .long CAN_TX_IRQ_IRQHandler - .long CAN_RXD_IRQ_IRQHandler - .long CAN_RXI_IRQ_IRQHandler - .long CAN_SCE_IRQ_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM15_IRQ_IRQHandler - .long TIM16_IRQ_IRQHandler - .long TIM17_IRQ_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long 0 - .long 0 - .long I2C1_EV_IRQ_IRQHandler - .long I2C1_ER_IRQ_IRQHandler - .long I2C2_EV_IRQ_IRQHandler - .long I2C2_ER_IRQ_IRQHandler - .long SPI1_IRQ_IRQHandler - .long SPI2_IRQ_IRQHandler - .long USART1_IRQ_IRQHandler - .long USART2_EXTI26_IRQHandler - .long USART3_EXTI28_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IT_IRQ_IRQHandler - .long CEC_IRQ_IRQHandler - .long TIM12_IRQ_IRQHandler - .long TIM13_IRQ_IRQHandler - .long TIM14_IRQ_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long SPI3_IRQ_IRQHandler - .long 0 - .long 0 - .long TIM6_DAC1_IRQHandler - .long TIM7_IRQ_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long ADC_SD1_IRQ_IRQHandler - .long ADC_SD2_IRQ_IRQHandler - .long ADC_SD3_IRQ_IRQHandler - .long COMP1_2_3_IRQHandler - .long COMP4_5_6_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long I2C3_EV_IRQ_IRQHandler - .long I2C3_ER_IRQ_IRQHandler - .long USB_HP_IRQ_IRQHandler - .long USB_LP_IRQ_IRQHandler - .long USB_WAKEUP_IRQ_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long FPU_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQ_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQ_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_TSC_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_IRQ_IRQHandler - IRQ CAN_TX_IRQ_IRQHandler - IRQ CAN_RXD_IRQ_IRQHandler - IRQ CAN_RXI_IRQ_IRQHandler - IRQ CAN_SCE_IRQ_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM15_IRQ_IRQHandler - IRQ TIM16_IRQ_IRQHandler - IRQ TIM17_IRQ_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM18_DAC3_IRQ_IRQHandler - IRQ TIM2_IRQHandler - IRQ I2C1_EV_IRQ_IRQHandler - IRQ I2C1_EV_EXTI23_IRQHandler - IRQ I2C1_ER_IRQ_IRQHandler - IRQ I2C2_EV_IRQ_IRQHandler - IRQ I2C2_ER_IRQ_IRQHandler - IRQ SPI1_IRQ_IRQHandler - IRQ SPI2_IRQ_IRQHandler - IRQ USART1_IRQ_IRQHandler - IRQ USART1_EXTI25_IRQHandler - IRQ USART2_EXTI26_IRQHandler - IRQ USART2_IRQ_IRQHandler - IRQ USART3_EXTI28_IRQHandler - IRQ USART3_IRQ_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IT_IRQ_IRQHandler - IRQ CEC_IRQ_IRQHandler - IRQ TIM12_IRQ_IRQHandler - IRQ TIM13_IRQ_IRQHandler - IRQ TIM14_IRQ_IRQHandler - IRQ SPI3_IRQ_IRQHandler - IRQ TIM6_DAC1_IRQHandler - IRQ TIM7_IRQ_IRQHandler - IRQ ADC_SD1_IRQ_IRQHandler - IRQ ADC_SD2_IRQ_IRQHandler - IRQ ADC_SD3_IRQ_IRQHandler - IRQ COMP1_2_3_IRQHandler - IRQ COMP4_5_6_IRQHandler - IRQ I2C3_EV_IRQ_IRQHandler - IRQ I2C3_ER_IRQ_IRQHandler - IRQ USB_HP_IRQ_IRQHandler - IRQ USB_LP_IRQ_IRQHandler - IRQ USB_WAKEUP_IRQ_IRQHandler - IRQ USB_WKUP_EXTI_IRQHandler - IRQ FPU_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f302.go b/device/stm32/stm32f302.go index a41ad42..05be15b 100644 --- a/device/stm32/stm32f302.go +++ b/device/stm32/stm32f302.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -212,8 +212,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f302.s b/device/stm32/stm32f302.s deleted file mode 100644 index 921e16d..0000000 --- a/device/stm32/stm32f302.s +++ /dev/null @@ -1,213 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f302.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F302 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_TSC_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_2_IRQHandler - .long USB_HP_CAN_TX_IRQHandler - .long USB_LP_CAN_RX0_IRQHandler - .long CAN_RX1_IRQHandler - .long CAN_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_TIM17_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_EXTI23_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_EXTI24_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_EXTI25_IRQHandler - .long USART2_EXTI26_IRQHandler - .long USART3_EXTI28_IRQHandler - .long EXTI15_10_IRQHandler - .long RTCAlarm_IRQHandler - .long USB_WKUP_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long 0 - .long FMC_IRQHandler - .long 0 - .long 0 - .long SPI3_IRQHandler - .long UART4_EXTI34_IRQHandler - .long UART5_EXTI35_IRQHandler - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long 0 - .long 0 - .long 0 - .long COMP1_2_3_IRQHandler - .long COMP4_5_6_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long USB_WKUP_EXTI_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long FPU_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_TSC_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_CAN_TX_IRQHandler - IRQ USB_LP_CAN_RX0_IRQHandler - IRQ CAN_RX1_IRQHandler - IRQ CAN_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_TIM17_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_EXTI23_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_EXTI24_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_EXTI25_IRQHandler - IRQ USART2_EXTI26_IRQHandler - IRQ USART3_EXTI28_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTCAlarm_IRQHandler - IRQ USB_WKUP_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ FMC_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_EXTI34_IRQHandler - IRQ UART5_EXTI35_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ COMP1_2_3_IRQHandler - IRQ COMP4_5_6_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ USB_WKUP_EXTI_IRQHandler - IRQ FPU_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f303.go b/device/stm32/stm32f303.go index e763e23..3170d0a 100644 --- a/device/stm32/stm32f303.go +++ b/device/stm32/stm32f303.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -239,8 +239,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f303.s b/device/stm32/stm32f303.s deleted file mode 100644 index 053436d..0000000 --- a/device/stm32/stm32f303.s +++ /dev/null @@ -1,228 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f303.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F303 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_TSC_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_2_IRQHandler - .long USB_HP_CAN_TX_IRQHandler - .long USB_LP_CAN_RX0_IRQHandler - .long CAN_RX1_IRQHandler - .long CAN_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_TIM17_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_EXTI23_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_EXTI24_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_EXTI25_IRQHandler - .long USART2_EXTI26_IRQHandler - .long USART3_EXTI28_IRQHandler - .long EXTI15_10_IRQHandler - .long RTCAlarm_IRQHandler - .long USB_WKUP_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long FMC_IRQHandler - .long 0 - .long 0 - .long SPI3_IRQHandler - .long UART4_EXTI34_IRQHandler - .long UART5_EXTI35_IRQHandler - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long ADC4_IRQHandler - .long 0 - .long 0 - .long COMP123_IRQHandler - .long COMP456_IRQHandler - .long COMP7_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long USB_WKUP_EXTI_IRQHandler - .long TIM20_BRK_IRQHandler - .long TIM20_UP_IRQHandler - .long TIM20_TRG_COM_IRQHandler - .long TIM20_CC_IRQHandler - .long FPU_IRQHandler - .long 0 - .long 0 - .long SPI4_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_TSC_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_CAN_TX_IRQHandler - IRQ USB_LP_CAN_RX0_IRQHandler - IRQ CAN_RX1_IRQHandler - IRQ CAN_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_TIM17_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_EXTI23_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_EXTI24_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_EXTI25_IRQHandler - IRQ USART2_EXTI26_IRQHandler - IRQ USART3_EXTI28_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTCAlarm_IRQHandler - IRQ USB_WKUP_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ FMC_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_EXTI34_IRQHandler - IRQ UART5_EXTI35_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ ADC4_IRQHandler - IRQ COMP123_IRQHandler - IRQ COMP1_2_3_IRQHandler - IRQ COMP456_IRQHandler - IRQ COMP4_5_6_IRQHandler - IRQ COMP7_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ USB_WKUP_EXTI_IRQHandler - IRQ TIM20_BRK_IRQHandler - IRQ TIM20_UP_IRQHandler - IRQ TIM20_TRG_COM_IRQHandler - IRQ TIM20_CC_IRQHandler - IRQ FPU_IRQHandler - IRQ SPI4_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f373.go b/device/stm32/stm32f373.go index c016413..1cba353 100644 --- a/device/stm32/stm32f373.go +++ b/device/stm32/stm32f373.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -207,8 +207,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f373.s b/device/stm32/stm32f373.s deleted file mode 100644 index 48d7f90..0000000 --- a/device/stm32/stm32f373.s +++ /dev/null @@ -1,213 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f373.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F373 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_TS_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_IRQHandler - .long CAN_TX_IRQHandler - .long CAN_RXD_IRQHandler - .long CAN_RXI_IRQHandler - .long CAN_SCE_IRQHandler - .long EXTI5_9_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long TIM18_DAC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long CEC_IRQHandler - .long TIM12_IRQHandler - .long TIM13_IRQHandler - .long TIM14_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long 0 - .long 0 - .long TIM6_DAC1_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long SDADC1_IRQHandler - .long SDADC2_IRQHandler - .long SDADC3_IRQHandler - .long COMP1_2_3_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long USB_WAKEUP_IRQHandler - .long 0 - .long TIM19_IRQHandler - .long 0 - .long 0 - .long FPU_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_TS_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_IRQHandler - IRQ CAN_TX_IRQHandler - IRQ CAN_RXD_IRQHandler - IRQ CAN_RXI_IRQHandler - IRQ CAN_SCE_IRQHandler - IRQ EXTI5_9_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ TIM18_DAC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ CEC_IRQHandler - IRQ TIM12_IRQHandler - IRQ TIM13_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ TIM6_DAC1_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ SDADC1_IRQHandler - IRQ SDADC2_IRQHandler - IRQ SDADC3_IRQHandler - IRQ COMP1_2_3_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ USB_WAKEUP_IRQHandler - IRQ TIM19_IRQHandler - IRQ FPU_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f3x4.go b/device/stm32/stm32f3x4.go index 2b1af32..0733a96 100644 --- a/device/stm32/stm32f3x4.go +++ b/device/stm32/stm32f3x4.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -178,8 +178,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f3x4.s b/device/stm32/stm32f3x4.s deleted file mode 100644 index 0a79510..0000000 --- a/device/stm32/stm32f3x4.s +++ /dev/null @@ -1,199 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f3x4.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F3x4 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_TSC_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_2_IRQHandler - .long USB_HP_CAN_TX_IRQHandler - .long USB_LP_CAN_RX0_IRQHandler - .long CAN_RX1_IRQHandler - .long CAN_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_TIM17_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQ_IRQHandler - .long 0 - .long I2C1_EV_EXTI23_IRQHandler - .long I2C1_ER_IRQHandler - .long 0 - .long 0 - .long SPI1_IRQHandler - .long 0 - .long USART1_EXTI25_IRQHandler - .long USART2_EXTI26_IRQHandler - .long USART3_EXTI28_IRQHandler - .long EXTI15_10_IRQHandler - .long RTCAlarm_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long TIM6_DAC1_IRQHandler - .long TIM7_DAC2_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long COMP1_2_3_IRQHandler - .long COMP4_5_6_IRQHandler - .long 0 - .long HRTIM_MST_IRQHandler - .long HRTIM_TIMA_IRQHandler - .long HRTIM_TIMB_IRQHandler - .long HRTIM_TIMC_IRQHandler - .long HRTIM_TIMD_IRQHandler - .long HRTIM_TIME_IRQHandler - .long HRTIM_FLT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long FPU_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_TSC_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_CAN_TX_IRQHandler - IRQ USB_LP_CAN_RX0_IRQHandler - IRQ CAN_RX1_IRQHandler - IRQ CAN_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_TIM17_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQ_IRQHandler - IRQ I2C1_EV_EXTI23_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ USART1_EXTI25_IRQHandler - IRQ USART2_EXTI26_IRQHandler - IRQ USART3_EXTI28_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTCAlarm_IRQHandler - IRQ TIM6_DAC1_IRQHandler - IRQ TIM7_DAC2_IRQHandler - IRQ COMP1_2_3_IRQHandler - IRQ COMP4_5_6_IRQHandler - IRQ HRTIM_MST_IRQHandler - IRQ HRTIM_TIMA_IRQHandler - IRQ HRTIM_TIMB_IRQHandler - IRQ HRTIM_TIMC_IRQHandler - IRQ HRTIM_TIMD_IRQHandler - IRQ HRTIM_TIME_IRQHandler - IRQ HRTIM_FLT_IRQHandler - IRQ FPU_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f401.go b/device/stm32/stm32f401.go index 83de11a..e4f247b 100644 --- a/device/stm32/stm32f401.go +++ b/device/stm32/stm32f401.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -190,8 +190,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PVD_IRQHandler func interruptPVD() { diff --git a/device/stm32/stm32f401.s b/device/stm32/stm32f401.s deleted file mode 100644 index 80c9d38..0000000 --- a/device/stm32/stm32f401.s +++ /dev/null @@ -1,207 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f401.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F401 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_STREAM0_IRQHandler - .long DMA1_STREAM1_IRQHandler - .long DMA1_STREAM2_IRQHandler - .long DMA1_STREAM3_IRQHandler - .long DMA1_STREAM4_IRQHandler - .long DMA1_STREAM5_IRQHandler - .long DMA1_STREAM6_IRQHandler - .long ADC_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA1_STREAM7_IRQHandler - .long 0 - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA2_STREAM0_IRQHandler - .long DMA2_STREAM1_IRQHandler - .long DMA2_STREAM2_IRQHandler - .long DMA2_STREAM3_IRQHandler - .long DMA2_STREAM4_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long OTG_FS_IRQHandler - .long DMA2_STREAM5_IRQHandler - .long DMA2_STREAM6_IRQHandler - .long DMA2_STREAM7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long FPU_IRQHandler - .long 0 - .long 0 - .long SPI4_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_STREAM0_IRQHandler - IRQ DMA1_STREAM1_IRQHandler - IRQ DMA1_STREAM2_IRQHandler - IRQ DMA1_STREAM3_IRQHandler - IRQ DMA1_STREAM4_IRQHandler - IRQ DMA1_STREAM5_IRQHandler - IRQ DMA1_STREAM6_IRQHandler - IRQ ADC_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ DMA1_STREAM7_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ DMA2_STREAM0_IRQHandler - IRQ DMA2_STREAM1_IRQHandler - IRQ DMA2_STREAM2_IRQHandler - IRQ DMA2_STREAM3_IRQHandler - IRQ DMA2_STREAM4_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_STREAM5_IRQHandler - IRQ DMA2_STREAM6_IRQHandler - IRQ DMA2_STREAM7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ FPU_IRQHandler - IRQ SPI4_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f405.go b/device/stm32/stm32f405.go index e6f137f..ee9fe3b 100644 --- a/device/stm32/stm32f405.go +++ b/device/stm32/stm32f405.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -252,8 +252,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f405.s b/device/stm32/stm32f405.s deleted file mode 100644 index 17f9dd0..0000000 --- a/device/stm32/stm32f405.s +++ /dev/null @@ -1,240 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f405.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F405 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long 0 - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FSMC_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long LTDC_IRQHandler - .long LTDC_ER_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FSMC_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ LTDC_IRQHandler - IRQ LTDC_ER_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f407.go b/device/stm32/stm32f407.go index a8ce977..bbf5308 100644 --- a/device/stm32/stm32f407.go +++ b/device/stm32/stm32f407.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -252,8 +252,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f407.s b/device/stm32/stm32f407.s deleted file mode 100644 index 87bcaef..0000000 --- a/device/stm32/stm32f407.s +++ /dev/null @@ -1,240 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f407.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F407 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long 0 - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FSMC_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long LCD_TFT_IRQHandler - .long LCD_TFT_1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FSMC_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ LCD_TFT_IRQHandler - IRQ LCD_TFT_1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f410.go b/device/stm32/stm32f410.go index da6a163..3930ec0 100644 --- a/device/stm32/stm32f410.go +++ b/device/stm32/stm32f410.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -190,8 +190,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f410.s b/device/stm32/stm32f410.s deleted file mode 100644 index 62a0c7b..0000000 --- a/device/stm32/stm32f410.s +++ /dev/null @@ -1,219 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f410.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F410 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long PWM1_UP_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long 0 - .long 0 - .long 0 - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA1_Stream7_IRQHandler - .long 0 - .long 0 - .long TIM5_IRQHandler - .long 0 - .long 0 - .long 0 - .long TIM6_DAC1_IRQHandler - .long 0 - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long 0 - .long EXTI19_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long EXTI20_IRQHandler - .long 0 - .long 0 - .long 0 - .long RNG_IRQHandler - .long FPU_IRQHandler - .long 0 - .long 0 - .long 0 - .long SPI5_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long LPTIM1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ PWM1_UP_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ TIM5_IRQHandler - IRQ TIM6_DAC1_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ EXTI19_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ EXTI20_IRQHandler - IRQ RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ SPI5_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ LPTIM1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f411.go b/device/stm32/stm32f411.go index 43102ee..b4e4252 100644 --- a/device/stm32/stm32f411.go +++ b/device/stm32/stm32f411.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -197,8 +197,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f411.s b/device/stm32/stm32f411.s deleted file mode 100644 index 2700796..0000000 --- a/device/stm32/stm32f411.s +++ /dev/null @@ -1,210 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f411.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F411 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA1_Stream7_IRQHandler - .long 0 - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long FPU_IRQHandler - .long 0 - .long 0 - .long SPI4_IRQHandler - .long SPI5_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ FPU_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f412.go b/device/stm32/stm32f412.go index 7e1854e..fffa266 100644 --- a/device/stm32/stm32f412.go +++ b/device/stm32/stm32f412.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -258,8 +258,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f412.s b/device/stm32/stm32f412.s deleted file mode 100644 index 693d0be..0000000 --- a/device/stm32/stm32f412.s +++ /dev/null @@ -1,243 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f412.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F412 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM12_IRQHandler - .long TIM13_IRQHandler - .long TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FSMC_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long 0 - .long 0 - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long 0 - .long 0 - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long Quad_SPI_IRQHandler - .long 0 - .long 0 - .long I2CFMP1_event_IRQHandler - .long I2CFMP1_error_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM12_IRQHandler - IRQ TIM13_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FSMC_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ Quad_SPI_IRQHandler - IRQ I2CFMP1_event_IRQHandler - IRQ I2CFMP1_error_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f413.go b/device/stm32/stm32f413.go index bdc690a..bd8905a 100644 --- a/device/stm32/stm32f413.go +++ b/device/stm32/stm32f413.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -276,8 +276,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export PVD_IRQHandler func interruptPVD() { diff --git a/device/stm32/stm32f413.s b/device/stm32/stm32f413.s deleted file mode 100644 index c665489..0000000 --- a/device/stm32/stm32f413.s +++ /dev/null @@ -1,263 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f413.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F413 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long 0 - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EVT_IRQHandler - .long I2C1_ERR_IRQHandler - .long I2C2_EVT_IRQHandler - .long I2C2_ERR_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long EXTI17_RTC_Alarm_IRQHandler - .long 0 - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FSMC_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long USART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_GLB_IT_DAC1_DAC2_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long CAN3_TX_IRQHandler - .long CAN3_RX0_IRQHandler - .long CAN3_RX1_IRQHandler - .long CAN3_SCE_IRQHandler - .long 0 - .long CRYPTO_IRQHandler - .long RNG_IRQHandler - .long FPU_IRQHandler - .long USART7_IRQHandler - .long USART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long 0 - .long SAI1_IRQHandler - .long UART9_IRQHandler - .long UART10_IRQHandler - .long 0 - .long 0 - .long QuadSPI_IRQHandler - .long 0 - .long 0 - .long I2CFMP1event_IRQHandler - .long I2CFMP1error_IRQHandler - .long lptim1_OR_it_eit_23_IRQHandler - .long DFSDM2_FILTER1_IRQHandler - .long DFSDM2_FILTER2_IRQHandler - .long DFSDM2_FILTER3_IRQHandler - .long DFSDM2_FILTER4_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EVT_IRQHandler - IRQ I2C1_ERR_IRQHandler - IRQ I2C2_EVT_IRQHandler - IRQ I2C2_ERR_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ EXTI17_RTC_Alarm_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FSMC_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ USART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_GLB_IT_DAC1_DAC2_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ CAN3_TX_IRQHandler - IRQ CAN3_RX0_IRQHandler - IRQ CAN3_RX1_IRQHandler - IRQ CAN3_SCE_IRQHandler - IRQ CRYPTO_IRQHandler - IRQ RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ USART7_IRQHandler - IRQ USART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SAI1_IRQHandler - IRQ UART9_IRQHandler - IRQ UART10_IRQHandler - IRQ QuadSPI_IRQHandler - IRQ I2CFMP1event_IRQHandler - IRQ I2CFMP1error_IRQHandler - IRQ lptim1_OR_it_eit_23_IRQHandler - IRQ DFSDM2_FILTER1_IRQHandler - IRQ DFSDM2_FILTER2_IRQHandler - IRQ DFSDM2_FILTER3_IRQHandler - IRQ DFSDM2_FILTER4_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f427.go b/device/stm32/stm32f427.go index 55e9620..59b8846 100644 --- a/device/stm32/stm32f427.go +++ b/device/stm32/stm32f427.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -264,8 +264,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f427.s b/device/stm32/stm32f427.s deleted file mode 100644 index aa78ac4..0000000 --- a/device/stm32/stm32f427.s +++ /dev/null @@ -1,246 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f427.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F427 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FMC_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long 0 - .long LCD_TFT_IRQHandler - .long LCD_TFT_1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ LCD_TFT_IRQHandler - IRQ LCD_TFT_1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f429.go b/device/stm32/stm32f429.go index 908bb70..ddfd30f 100644 --- a/device/stm32/stm32f429.go +++ b/device/stm32/stm32f429.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -270,8 +270,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f429.s b/device/stm32/stm32f429.s deleted file mode 100644 index 6a6db36..0000000 --- a/device/stm32/stm32f429.s +++ /dev/null @@ -1,249 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f429.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F429 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FMC_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LCD_TFT_IRQHandler - .long LCD_TFT_1_IRQHandler - .long DMA2D_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LCD_TFT_IRQHandler - IRQ LCD_TFT_1_IRQHandler - IRQ DMA2D_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f446.go b/device/stm32/stm32f446.go index f08908d..cfb65e1 100644 --- a/device/stm32/stm32f446.go +++ b/device/stm32/stm32f446.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -248,8 +248,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f446.s b/device/stm32/stm32f446.s deleted file mode 100644 index 2c735f6..0000000 --- a/device/stm32/stm32f446.s +++ /dev/null @@ -1,237 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f446.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F446 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long 0 - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FMC_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long DCMI_IRQHandler - .long 0 - .long 0 - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long 0 - .long 0 - .long 0 - .long LCD_TFT_IRQHandler - .long LCD_TFT_1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ DCMI_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ LCD_TFT_IRQHandler - IRQ LCD_TFT_1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f469.go b/device/stm32/stm32f469.go index cf1ecc3..70d0d51 100644 --- a/device/stm32/stm32f469.go +++ b/device/stm32/stm32f469.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -277,8 +277,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f469.s b/device/stm32/stm32f469.s deleted file mode 100644 index 9be2bf0..0000000 --- a/device/stm32/stm32f469.s +++ /dev/null @@ -1,253 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f469.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F469 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FMC_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LCD_TFT_IRQHandler - .long LCD_TFT_1_IRQHandler - .long DMA2D_IRQHandler - .long QUADSPI_IRQHandler - .long DSIHOST_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LCD_TFT_IRQHandler - IRQ LCD_TFT_1_IRQHandler - IRQ DMA2D_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ DSIHOST_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f730.go b/device/stm32/stm32f730.go index 059186c..e082e47 100644 --- a/device/stm32/stm32f730.go +++ b/device/stm32/stm32f730.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -252,8 +252,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f730.s b/device/stm32/stm32f730.s deleted file mode 100644 index 2f1fa16..0000000 --- a/device/stm32/stm32f730.s +++ /dev/null @@ -1,255 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f730.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F730 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FSMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long 0 - .long AES_IRQHandler - .long RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long 0 - .long SAI1_IRQHandler - .long 0 - .long 0 - .long 0 - .long SAI2_IRQHandler - .long QuadSPI_IRQHandler - .long LP_Timer1_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long SDMMC2_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FSMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ AES_IRQHandler - IRQ RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SAI1_IRQHandler - IRQ SAI2_IRQHandler - IRQ QuadSPI_IRQHandler - IRQ LP_Timer1_IRQHandler - IRQ SDMMC2_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f745.go b/device/stm32/stm32f745.go index 81dc233..713927c 100644 --- a/device/stm32/stm32f745.go +++ b/device/stm32/stm32f745.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -303,8 +303,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f745.s b/device/stm32/stm32f745.s deleted file mode 100644 index 69bd150..0000000 --- a/device/stm32/stm32f745.s +++ /dev/null @@ -1,264 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f745.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F745 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LTDC_IRQHandler - .long LTDC_ER_IRQHandler - .long DMA2D_IRQHandler - .long SAI2_IRQHandler - .long QuadSPI_IRQHandler - .long LPTimer1_IRQHandler - .long HDMI_CEC_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPDIFRX_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LTDC_IRQHandler - IRQ LTDC_ER_IRQHandler - IRQ DMA2D_IRQHandler - IRQ SAI2_IRQHandler - IRQ QuadSPI_IRQHandler - IRQ LPTimer1_IRQHandler - IRQ LP_Timer1_IRQHandler - IRQ HDMI_CEC_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPDIFRX_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f750.go b/device/stm32/stm32f750.go index 4895dba..5a3e374 100644 --- a/device/stm32/stm32f750.go +++ b/device/stm32/stm32f750.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -289,8 +289,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f750.s b/device/stm32/stm32f750.s deleted file mode 100644 index c4c3f4d..0000000 --- a/device/stm32/stm32f750.s +++ /dev/null @@ -1,263 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f750.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F750 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LTDC_IRQHandler - .long LTDC_ER_IRQHandler - .long DMA2D_IRQHandler - .long SAI2_IRQHandler - .long QuadSPI_IRQHandler - .long LPTIMER1_IRQHandler - .long HDMI_CEC_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPDIFRX_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LTDC_IRQHandler - IRQ LTDC_ER_IRQHandler - IRQ DMA2D_IRQHandler - IRQ SAI2_IRQHandler - IRQ QuadSPI_IRQHandler - IRQ LPTIMER1_IRQHandler - IRQ HDMI_CEC_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPDIFRX_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f765.go b/device/stm32/stm32f765.go index 347d24c..05dac70 100644 --- a/device/stm32/stm32f765.go +++ b/device/stm32/stm32f765.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -334,8 +334,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f765.s b/device/stm32/stm32f765.s deleted file mode 100644 index 34b60f8..0000000 --- a/device/stm32/stm32f765.s +++ /dev/null @@ -1,288 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f765.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F765 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LTDC_IRQHandler - .long LTDC_ER_IRQHandler - .long DMA2D_IRQHandler - .long SAI2_IRQHandler - .long QuadSPI_IRQHandler - .long LPTimer1_IRQHandler - .long HDMI_CEC_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPDIFRX_IRQHandler - .long DSIHOST_IRQHandler - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long SDMMC2_IRQHandler - .long CAN3_TX_IRQHandler - .long CAN3_RX0_IRQHandler - .long CAN3_RX1_IRQHandler - .long CAN3_SCE_IRQHandler - .long JPEG_IRQHandler - .long MDIOS_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LTDC_IRQHandler - IRQ LTDC_ER_IRQHandler - IRQ DMA2D_IRQHandler - IRQ SAI2_IRQHandler - IRQ QuadSPI_IRQHandler - IRQ LPTimer1_IRQHandler - IRQ LP_Timer1_IRQHandler - IRQ HDMI_CEC_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPDIFRX_IRQHandler - IRQ DSIHOST_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ SDMMC2_IRQHandler - IRQ CAN3_TX_IRQHandler - IRQ CAN3_RX0_IRQHandler - IRQ CAN3_RX1_IRQHandler - IRQ CAN3_SCE_IRQHandler - IRQ JPEG_IRQHandler - IRQ MDIOS_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f7x2.go b/device/stm32/stm32f7x2.go index f737649..31c4816 100644 --- a/device/stm32/stm32f7x2.go +++ b/device/stm32/stm32f7x2.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -252,8 +252,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f7x2.s b/device/stm32/stm32f7x2.s deleted file mode 100644 index 714c98f..0000000 --- a/device/stm32/stm32f7x2.s +++ /dev/null @@ -1,255 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f7x2.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F7x2 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FSMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long 0 - .long AES_IRQHandler - .long RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long 0 - .long SAI1_IRQHandler - .long 0 - .long 0 - .long 0 - .long SAI2_IRQHandler - .long QuadSPI_IRQHandler - .long LP_Timer1_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long SDMMC2_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FSMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ AES_IRQHandler - IRQ RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SAI1_IRQHandler - IRQ SAI2_IRQHandler - IRQ QuadSPI_IRQHandler - IRQ LP_Timer1_IRQHandler - IRQ SDMMC2_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f7x3.go b/device/stm32/stm32f7x3.go index ba79d29..0752a43 100644 --- a/device/stm32/stm32f7x3.go +++ b/device/stm32/stm32f7x3.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -252,8 +252,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f7x3.s b/device/stm32/stm32f7x3.s deleted file mode 100644 index c183f24..0000000 --- a/device/stm32/stm32f7x3.s +++ /dev/null @@ -1,255 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f7x3.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F7x3 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FSMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long 0 - .long AES_IRQHandler - .long RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long 0 - .long SAI1_IRQHandler - .long 0 - .long 0 - .long 0 - .long SAI2_IRQHandler - .long QuadSPI_IRQHandler - .long LP_Timer1_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long SDMMC2_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FSMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ AES_IRQHandler - IRQ RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SAI1_IRQHandler - IRQ SAI2_IRQHandler - IRQ QuadSPI_IRQHandler - IRQ LP_Timer1_IRQHandler - IRQ SDMMC2_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f7x6.go b/device/stm32/stm32f7x6.go index be97528..928b47c 100644 --- a/device/stm32/stm32f7x6.go +++ b/device/stm32/stm32f7x6.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -302,8 +302,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f7x6.s b/device/stm32/stm32f7x6.s deleted file mode 100644 index 1317b9d..0000000 --- a/device/stm32/stm32f7x6.s +++ /dev/null @@ -1,264 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f7x6.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F7x6 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LTDC_IRQHandler - .long LTDC_ER_IRQHandler - .long DMA2D_IRQHandler - .long SAI2_IRQHandler - .long QuadSPI_IRQHandler - .long LPTimer1_IRQHandler - .long HDMI_CEC_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPDIFRX_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LTDC_IRQHandler - IRQ LTDC_ER_IRQHandler - IRQ DMA2D_IRQHandler - IRQ SAI2_IRQHandler - IRQ QuadSPI_IRQHandler - IRQ LPTimer1_IRQHandler - IRQ LP_Timer1_IRQHandler - IRQ HDMI_CEC_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPDIFRX_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f7x7.go b/device/stm32/stm32f7x7.go index 2fe4cc9..97366d8 100644 --- a/device/stm32/stm32f7x7.go +++ b/device/stm32/stm32f7x7.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -329,8 +329,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f7x7.s b/device/stm32/stm32f7x7.s deleted file mode 100644 index 7950026..0000000 --- a/device/stm32/stm32f7x7.s +++ /dev/null @@ -1,287 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f7x7.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F7x7 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LTDC_IRQHandler - .long LTDC_ER_IRQHandler - .long DMA2D_IRQHandler - .long SAI2_IRQHandler - .long QuadSPI_IRQHandler - .long LP_Timer1_IRQHandler - .long HDMI_CEC_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPDIFRX_IRQHandler - .long DSIHOST_IRQHandler - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long SDMMC2_IRQHandler - .long CAN3_TX_IRQHandler - .long CAN3_RX0_IRQHandler - .long CAN3_RX1_IRQHandler - .long CAN3_SCE_IRQHandler - .long JPEG_IRQHandler - .long MDIOS_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LTDC_IRQHandler - IRQ LTDC_ER_IRQHandler - IRQ DMA2D_IRQHandler - IRQ SAI2_IRQHandler - IRQ QuadSPI_IRQHandler - IRQ LP_Timer1_IRQHandler - IRQ HDMI_CEC_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPDIFRX_IRQHandler - IRQ DSIHOST_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ SDMMC2_IRQHandler - IRQ CAN3_TX_IRQHandler - IRQ CAN3_RX0_IRQHandler - IRQ CAN3_RX1_IRQHandler - IRQ CAN3_SCE_IRQHandler - IRQ JPEG_IRQHandler - IRQ MDIOS_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32f7x9.go b/device/stm32/stm32f7x9.go index 2979ab6..1177e46 100644 --- a/device/stm32/stm32f7x9.go +++ b/device/stm32/stm32f7x9.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -335,8 +335,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32f7x9.s b/device/stm32/stm32f7x9.s deleted file mode 100644 index af9b4cc..0000000 --- a/device/stm32/stm32f7x9.s +++ /dev/null @@ -1,289 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32f7x9.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32F7x9 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Stream0_IRQHandler - .long DMA1_Stream1_IRQHandler - .long DMA1_Stream2_IRQHandler - .long DMA1_Stream3_IRQHandler - .long DMA1_Stream4_IRQHandler - .long DMA1_Stream5_IRQHandler - .long DMA1_Stream6_IRQHandler - .long ADC_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM9_IRQHandler - .long TIM1_UP_TIM10_IRQHandler - .long TIM1_TRG_COM_TIM11_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_Stream7_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_Stream0_IRQHandler - .long DMA2_Stream1_IRQHandler - .long DMA2_Stream2_IRQHandler - .long DMA2_Stream3_IRQHandler - .long DMA2_Stream4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_Stream5_IRQHandler - .long DMA2_Stream6_IRQHandler - .long DMA2_Stream7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LTDC_IRQHandler - .long LCD_TFT_1_IRQHandler - .long DMA2D_IRQHandler - .long SAI2_IRQHandler - .long QuadSPI_IRQHandler - .long LPTimer1_IRQHandler - .long HDMI_CEC_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPDIFRX_IRQHandler - .long DSIHOST_IRQHandler - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long SDMMC2_IRQHandler - .long CAN3_TX_IRQHandler - .long CAN3_RX0_IRQHandler - .long CAN3_RX1_IRQHandler - .long CAN3_SCE_IRQHandler - .long JPEG_IRQHandler - .long MDIOS_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Stream0_IRQHandler - IRQ DMA1_Stream1_IRQHandler - IRQ DMA1_Stream2_IRQHandler - IRQ DMA1_Stream3_IRQHandler - IRQ DMA1_Stream4_IRQHandler - IRQ DMA1_Stream5_IRQHandler - IRQ DMA1_Stream6_IRQHandler - IRQ ADC_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM9_IRQHandler - IRQ TIM1_UP_TIM10_IRQHandler - IRQ TIM1_TRG_COM_TIM11_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_Stream7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_Stream0_IRQHandler - IRQ DMA2_Stream1_IRQHandler - IRQ DMA2_Stream2_IRQHandler - IRQ DMA2_Stream3_IRQHandler - IRQ DMA2_Stream4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_Stream5_IRQHandler - IRQ DMA2_Stream6_IRQHandler - IRQ DMA2_Stream7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LTDC_IRQHandler - IRQ LCD_TFT_1_IRQHandler - IRQ LTDC_ER_IRQHandler - IRQ DMA2D_IRQHandler - IRQ SAI2_IRQHandler - IRQ QuadSPI_IRQHandler - IRQ LPTimer1_IRQHandler - IRQ LP_Timer1_IRQHandler - IRQ HDMI_CEC_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPDIFRX_IRQHandler - IRQ DSIHOST_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ SDMMC2_IRQHandler - IRQ CAN3_TX_IRQHandler - IRQ CAN3_RX0_IRQHandler - IRQ CAN3_RX1_IRQHandler - IRQ CAN3_SCE_IRQHandler - IRQ JPEG_IRQHandler - IRQ MDIOS_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g030.go b/device/stm32/stm32g030.go index 3533eca..c822cbd 100644 --- a/device/stm32/stm32g030.go +++ b/device/stm32/stm32g030.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -105,8 +105,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g030.s b/device/stm32/stm32g030.s deleted file mode 100644 index 8dec651..0000000 --- a/device/stm32/stm32g030.s +++ /dev/null @@ -1,124 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g030.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G030 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_TAMP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long 0 - .long DMA_Channel1_IRQHandler - .long DMA_Channel2_3_IRQHandler - .long DMA_Channel4_5_6_7_IRQHandler - .long ADC_COMP_IRQHandler - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long 0 - .long 0 - .long TIM14_IRQHandler - .long 0 - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long CEC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_TAMP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ DMA_Channel1_IRQHandler - IRQ DMA_Channel2_3_IRQHandler - IRQ DMA_Channel4_5_6_7_IRQHandler - IRQ ADC_COMP_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ CEC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g031.go b/device/stm32/stm32g031.go index 81a359c..1dea0c3 100644 --- a/device/stm32/stm32g031.go +++ b/device/stm32/stm32g031.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -108,8 +108,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g031.s b/device/stm32/stm32g031.s deleted file mode 100644 index f573775..0000000 --- a/device/stm32/stm32g031.s +++ /dev/null @@ -1,125 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g031.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G031 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_TAMP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long 0 - .long DMA_Channel1_IRQHandler - .long DMA_Channel2_3_IRQHandler - .long DMA_Channel4_5_6_7_IRQHandler - .long ADC_COMP_IRQHandler - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long 0 - .long 0 - .long TIM14_IRQHandler - .long 0 - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_USART4_LPUART1_IRQHandler - .long CEC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_TAMP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ DMA_Channel1_IRQHandler - IRQ DMA_Channel2_3_IRQHandler - IRQ DMA_Channel4_5_6_7_IRQHandler - IRQ ADC_COMP_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_USART4_LPUART1_IRQHandler - IRQ CEC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g041.go b/device/stm32/stm32g041.go index bbc9679..f3b22d2 100644 --- a/device/stm32/stm32g041.go +++ b/device/stm32/stm32g041.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -111,8 +111,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g041.s b/device/stm32/stm32g041.s deleted file mode 100644 index 7231762..0000000 --- a/device/stm32/stm32g041.s +++ /dev/null @@ -1,127 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g041.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G041 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_TAMP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long 0 - .long DMA_Channel1_IRQHandler - .long DMA_Channel2_3_IRQHandler - .long DMA_Channel4_5_6_7_IRQHandler - .long ADC_COMP_IRQHandler - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long 0 - .long 0 - .long TIM14_IRQHandler - .long 0 - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_USART4_LPUART1_IRQHandler - .long CEC_IRQHandler - .long AES_RNG_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_TAMP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ DMA_Channel1_IRQHandler - IRQ DMA_Channel2_3_IRQHandler - IRQ DMA_Channel4_5_6_7_IRQHandler - IRQ ADC_COMP_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_USART4_LPUART1_IRQHandler - IRQ CEC_IRQHandler - IRQ AES_RNG_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g050.go b/device/stm32/stm32g050.go index 9f7f3a8..aaf7852 100644 --- a/device/stm32/stm32g050.go +++ b/device/stm32/stm32g050.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -75,8 +75,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g050.s b/device/stm32/stm32g050.s deleted file mode 100644 index 62fbc00..0000000 --- a/device/stm32/stm32g050.s +++ /dev/null @@ -1,112 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g050.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G050 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA1_Channel4_5_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler - .long ADC_IRQHandler - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long 0 - .long TIM3_IRQHandler - .long TIM6_IRQHandler - .long TIM7_IRQHandler - .long TIM14_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long 0 - .long 0 - .long USART1_IRQHandler - .long USART2_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ DMA1_Channel4_5_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler - IRQ ADC_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM6_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g051.go b/device/stm32/stm32g051.go index 996c27e..cf63a3a 100644 --- a/device/stm32/stm32g051.go +++ b/device/stm32/stm32g051.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -77,8 +77,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g051.s b/device/stm32/stm32g051.s deleted file mode 100644 index 5a88ca0..0000000 --- a/device/stm32/stm32g051.s +++ /dev/null @@ -1,115 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g051.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G051 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA_Channel4_5_6_7_IRQHandler - .long 0 - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long TIM14_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long 0 - .long 0 - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long CEC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ DMA_Channel4_5_6_7_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ CEC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g061.go b/device/stm32/stm32g061.go index 336c159..0e73844 100644 --- a/device/stm32/stm32g061.go +++ b/device/stm32/stm32g061.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -77,8 +77,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g061.s b/device/stm32/stm32g061.s deleted file mode 100644 index 4b6f151..0000000 --- a/device/stm32/stm32g061.s +++ /dev/null @@ -1,115 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g061.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G061 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA_Channel4_5_6_7_IRQHandler - .long 0 - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long TIM14_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long 0 - .long 0 - .long USART1_IRQHandler - .long USART2_IRQHandler - .long 0 - .long CEC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ DMA_Channel4_5_6_7_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ CEC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g070.go b/device/stm32/stm32g070.go index cbccea8..92173b9 100644 --- a/device/stm32/stm32g070.go +++ b/device/stm32/stm32g070.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -114,8 +114,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g070.s b/device/stm32/stm32g070.s deleted file mode 100644 index af6a12f..0000000 --- a/device/stm32/stm32g070.s +++ /dev/null @@ -1,127 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g070.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G070 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_STAMP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long 0 - .long DMA_Channel1_IRQHandler - .long DMA_Channel2_3_IRQHandler - .long DMA_Channel4_5_6_7_IRQHandler - .long ADC_IRQHandler - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long 0 - .long TIM3_IRQHandler - .long TIM6_IRQHandler - .long TIM7_IRQHandler - .long TIM14_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_USART4_IRQHandler - .long CEC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_STAMP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ DMA_Channel1_IRQHandler - IRQ DMA_Channel2_3_IRQHandler - IRQ DMA_Channel4_5_6_7_IRQHandler - IRQ ADC_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM6_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_USART4_IRQHandler - IRQ CEC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g071.go b/device/stm32/stm32g071.go index 910c259..b34aa1e 100644 --- a/device/stm32/stm32g071.go +++ b/device/stm32/stm32g071.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -118,8 +118,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g071.s b/device/stm32/stm32g071.s deleted file mode 100644 index b23dfa2..0000000 --- a/device/stm32/stm32g071.s +++ /dev/null @@ -1,129 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g071.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G071 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_STAMP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long UCPD1_UCPD2_IRQHandler - .long DMA_Channel1_IRQHandler - .long DMA_Channel2_3_IRQHandler - .long DMA_Channel4_5_6_7_IRQHandler - .long ADC_COMP_IRQHandler - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM6_DAC_LPTIM1_IRQHandler - .long TIM7_LPTIM2_IRQHandler - .long TIM14_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_USART4_LPUART1_IRQHandler - .long CEC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_STAMP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ UCPD1_UCPD2_IRQHandler - IRQ DMA_Channel1_IRQHandler - IRQ DMA_Channel2_3_IRQHandler - IRQ DMA_Channel4_5_6_7_IRQHandler - IRQ ADC_COMP_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM6_DAC_LPTIM1_IRQHandler - IRQ TIM7_LPTIM2_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_USART4_LPUART1_IRQHandler - IRQ CEC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g081.go b/device/stm32/stm32g081.go index ef7be2f..9a5bc74 100644 --- a/device/stm32/stm32g081.go +++ b/device/stm32/stm32g081.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -120,8 +120,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g081.s b/device/stm32/stm32g081.s deleted file mode 100644 index 0976936..0000000 --- a/device/stm32/stm32g081.s +++ /dev/null @@ -1,131 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g081.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G081 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_STAMP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long UCPD1_UCPD2_IRQHandler - .long DMA_Channel1_IRQHandler - .long DMA_Channel2_3_IRQHandler - .long DMA_Channel4_5_6_7_IRQHandler - .long ADC_COMP_IRQHandler - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM6_DAC_LPTIM1_IRQHandler - .long TIM7_LPTIM2_IRQHandler - .long TIM14_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_USART4_LPUART1_IRQHandler - .long CEC_IRQHandler - .long AES_RNG_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_STAMP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ UCPD1_UCPD2_IRQHandler - IRQ DMA_Channel1_IRQHandler - IRQ DMA_Channel2_3_IRQHandler - IRQ DMA_Channel4_5_6_7_IRQHandler - IRQ ADC_COMP_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM6_DAC_LPTIM1_IRQHandler - IRQ TIM7_LPTIM2_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_USART4_LPUART1_IRQHandler - IRQ CEC_IRQHandler - IRQ AES_RNG_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g0b0.go b/device/stm32/stm32g0b0.go index 72586cd..44ab1ae 100644 --- a/device/stm32/stm32g0b0.go +++ b/device/stm32/stm32g0b0.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -74,8 +74,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g0b0.s b/device/stm32/stm32g0b0.s deleted file mode 100644 index 57b45cd..0000000 --- a/device/stm32/stm32g0b0.s +++ /dev/null @@ -1,113 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g0b0.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G0B0 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA_Channel4_5_6_7_IRQHandler - .long 0 - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long 0 - .long TIM3_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long TIM14_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long 0 - .long 0 - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_USART4_USART5_USART6_LPUART1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ DMA_Channel4_5_6_7_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_USART4_USART5_USART6_LPUART1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g0b1.go b/device/stm32/stm32g0b1.go index b384bb3..d23fccc 100644 --- a/device/stm32/stm32g0b1.go +++ b/device/stm32/stm32g0b1.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -108,8 +108,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g0b1.s b/device/stm32/stm32g0b1.s deleted file mode 100644 index c18273c..0000000 --- a/device/stm32/stm32g0b1.s +++ /dev/null @@ -1,126 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g0b1.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G0B1 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_TAMP_IRQHandler - .long FLASH_IRQHandler - .long RCC_CRS_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long UCPD1_UCPD2_USB_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_COMP_IRQHandler - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_TIM4_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long TIM14_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_I2C3_IRQHandler - .long SPI1_IRQHandler - .long SPI2_SPI3_IRQHandler - .long USART1_IRQHandler - .long USART2_LPUART2_IRQHandler - .long USART3_USART4_USART5_USART6_LPUART1_IRQHandler - .long CEC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_TAMP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_CRS_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ UCPD1_UCPD2_USB_IRQHandler - IRQ ADC_COMP_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_TIM4_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_I2C3_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_SPI3_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_LPUART2_IRQHandler - IRQ USART3_USART4_USART5_USART6_LPUART1_IRQHandler - IRQ CEC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g0c1.go b/device/stm32/stm32g0c1.go index 1ec2bc3..f9777f6 100644 --- a/device/stm32/stm32g0c1.go +++ b/device/stm32/stm32g0c1.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -111,8 +111,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g0c1.s b/device/stm32/stm32g0c1.s deleted file mode 100644 index d3daf52..0000000 --- a/device/stm32/stm32g0c1.s +++ /dev/null @@ -1,128 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g0c1.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G0C1 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_TAMP_IRQHandler - .long FLASH_IRQHandler - .long RCC_CRS_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long UCPD1_UCPD2_USB_IRQHandler - .long 0 - .long 0 - .long 0 - .long ADC_COMP_IRQHandler - .long TIM1_BRK_UP_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_TIM4_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long TIM14_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long I2C1_IRQHandler - .long I2C2_I2C3_IRQHandler - .long SPI1_IRQHandler - .long SPI2_SPI3_IRQHandler - .long USART1_IRQHandler - .long USART2_LPUART2_IRQHandler - .long USART3_USART4_USART5_USART6_LPUART1_IRQHandler - .long CEC_IRQHandler - .long AES_RNG_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_TAMP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_CRS_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ UCPD1_UCPD2_USB_IRQHandler - IRQ ADC_COMP_IRQHandler - IRQ TIM1_BRK_UP_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_TIM4_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM14_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_I2C3_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_SPI3_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_LPUART2_IRQHandler - IRQ USART3_USART4_USART5_USART6_LPUART1_IRQHandler - IRQ CEC_IRQHandler - IRQ AES_RNG_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g431xx.go b/device/stm32/stm32g431xx.go index b42326e..c0ad266 100644 --- a/device/stm32/stm32g431xx.go +++ b/device/stm32/stm32g431xx.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -224,8 +224,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g431xx.s b/device/stm32/stm32g431xx.s deleted file mode 100644 index fcab0bb..0000000 --- a/device/stm32/stm32g431xx.s +++ /dev/null @@ -1,240 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g431.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G431xx -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long 0 - .long ADC1_2_IRQHandler - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long fdcan1_intr1_it_IRQHandler - .long fdcan1_intr0_it_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long USBWakeUP_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long 0 - .long 0 - .long LPTIM1_IRQHandler - .long 0 - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long 0 - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long 0 - .long 0 - .long UCPD1_IRQHandler - .long COMP1_2_3_IRQHandler - .long COMP4_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CRS_IRQHandler - .long SAI_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long FPU_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long RNG_IRQHandler - .long LPUART_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long DMAMUX_OVR_IRQHandler - .long 0 - .long 0 - .long DMA2_CH6_IRQHandler - .long 0 - .long 0 - .long Cordic_IRQHandler - .long FMAC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ fdcan1_intr1_it_IRQHandler - IRQ fdcan1_intr0_it_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ USBWakeUP_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ UCPD1_IRQHandler - IRQ COMP1_2_3_IRQHandler - IRQ COMP4_IRQHandler - IRQ CRS_IRQHandler - IRQ SAI_IRQHandler - IRQ FPU_IRQHandler - IRQ AES_IRQHandler - IRQ RNG_IRQHandler - IRQ LPUART_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ DMAMUX_OVR_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ Cordic_IRQHandler - IRQ FMAC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g441xx.go b/device/stm32/stm32g441xx.go index d680549..833b6a4 100644 --- a/device/stm32/stm32g441xx.go +++ b/device/stm32/stm32g441xx.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -224,8 +224,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g441xx.s b/device/stm32/stm32g441xx.s deleted file mode 100644 index ba7e93f..0000000 --- a/device/stm32/stm32g441xx.s +++ /dev/null @@ -1,240 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g441.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G441xx -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long 0 - .long ADC1_2_IRQHandler - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long fdcan1_intr1_it_IRQHandler - .long fdcan1_intr0_it_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long USBWakeUP_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long 0 - .long 0 - .long LPTIM1_IRQHandler - .long 0 - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long 0 - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long 0 - .long 0 - .long UCPD1_IRQHandler - .long COMP1_2_3_IRQHandler - .long COMP4_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CRS_IRQHandler - .long SAI_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long FPU_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long RNG_IRQHandler - .long LPUART_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long DMAMUX_OVR_IRQHandler - .long 0 - .long 0 - .long DMA2_CH6_IRQHandler - .long 0 - .long 0 - .long Cordic_IRQHandler - .long FMAC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ fdcan1_intr1_it_IRQHandler - IRQ fdcan1_intr0_it_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ USBWakeUP_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ UCPD1_IRQHandler - IRQ COMP1_2_3_IRQHandler - IRQ COMP4_IRQHandler - IRQ CRS_IRQHandler - IRQ SAI_IRQHandler - IRQ FPU_IRQHandler - IRQ AES_IRQHandler - IRQ RNG_IRQHandler - IRQ LPUART_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ DMAMUX_OVR_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ Cordic_IRQHandler - IRQ FMAC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g471xx.go b/device/stm32/stm32g471xx.go index b2a4611..165c460 100644 --- a/device/stm32/stm32g471xx.go +++ b/device/stm32/stm32g471xx.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -253,8 +253,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g471xx.s b/device/stm32/stm32g471xx.s deleted file mode 100644 index 96f7c17..0000000 --- a/device/stm32/stm32g471xx.s +++ /dev/null @@ -1,252 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g471.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G471xx -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_2_IRQHandler - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long fdcan1_intr1_it_IRQHandler - .long fdcan1_intr0_it_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long USBWakeUP_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long 0 - .long LPTIM1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long 0 - .long 0 - .long UCPD1_IRQHandler - .long COMP1_2_3_IRQHandler - .long COMP4_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CRS_IRQHandler - .long SAI_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long FPU_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPI4_IRQHandler - .long AES_IRQHandler - .long FDCAN2_intr0_IRQHandler - .long FDCAN2_intr1_IRQHandler - .long 0 - .long 0 - .long RNG_IRQHandler - .long LPUART_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long DMAMUX_OVR_IRQHandler - .long 0 - .long DMA1_CH8_IRQHandler - .long DMA2_CH6_IRQHandler - .long DMA2_CH7_IRQHandler - .long DMA2_CH8_IRQHandler - .long Cordic_IRQHandler - .long FMAC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ fdcan1_intr1_it_IRQHandler - IRQ fdcan1_intr0_it_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ USBWakeUP_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ UCPD1_IRQHandler - IRQ COMP1_2_3_IRQHandler - IRQ COMP4_IRQHandler - IRQ CRS_IRQHandler - IRQ SAI_IRQHandler - IRQ FPU_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPI4_IRQHandler - IRQ AES_IRQHandler - IRQ FDCAN2_intr0_IRQHandler - IRQ FDCAN2_intr1_IRQHandler - IRQ RNG_IRQHandler - IRQ LPUART_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ DMAMUX_OVR_IRQHandler - IRQ DMA1_CH8_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ DMA2_CH7_IRQHandler - IRQ DMA2_CH8_IRQHandler - IRQ Cordic_IRQHandler - IRQ FMAC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g473xx.go b/device/stm32/stm32g473xx.go index f11dafe..92ad7ae 100644 --- a/device/stm32/stm32g473xx.go +++ b/device/stm32/stm32g473xx.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -280,8 +280,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g473xx.s b/device/stm32/stm32g473xx.s deleted file mode 100644 index 3a74943..0000000 --- a/device/stm32/stm32g473xx.s +++ /dev/null @@ -1,263 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g473.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G473xx -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_2_IRQHandler - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long fdcan1_intr1_it_IRQHandler - .long fdcan1_intr0_it_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long USBWakeUP_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long FMC_IRQHandler - .long LPTIM1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long ADC4_IRQHandler - .long ADC5_IRQHandler - .long UCPD1_IRQHandler - .long COMP1_2_3_IRQHandler - .long COMP4_5_6_IRQHandler - .long COMP7_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CRS_IRQHandler - .long SAI_IRQHandler - .long TIM20_BRK_IRQHandler - .long TIM20_UP_IRQHandler - .long TIM20_TRG_COM_IRQHandler - .long TIM20_CC_IRQHandler - .long FPU_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPI4_IRQHandler - .long AES_IRQHandler - .long FDCAN2_intr0_IRQHandler - .long FDCAN2_intr1_IRQHandler - .long FDCAN3_intr0_IRQHandler - .long FDCAN3_intr1_IRQHandler - .long RNG_IRQHandler - .long LPUART_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long DMAMUX_OVR_IRQHandler - .long QUADSPI_IRQHandler - .long DMA1_CH8_IRQHandler - .long DMA2_CH6_IRQHandler - .long DMA2_CH7_IRQHandler - .long DMA2_CH8_IRQHandler - .long Cordic_IRQHandler - .long FMAC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ fdcan1_intr1_it_IRQHandler - IRQ fdcan1_intr0_it_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ USBWakeUP_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ FMC_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ ADC4_IRQHandler - IRQ ADC5_IRQHandler - IRQ UCPD1_IRQHandler - IRQ COMP1_2_3_IRQHandler - IRQ COMP4_5_6_IRQHandler - IRQ COMP7_IRQHandler - IRQ CRS_IRQHandler - IRQ SAI_IRQHandler - IRQ TIM20_BRK_IRQHandler - IRQ TIM20_UP_IRQHandler - IRQ TIM20_TRG_COM_IRQHandler - IRQ TIM20_CC_IRQHandler - IRQ FPU_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPI4_IRQHandler - IRQ AES_IRQHandler - IRQ FDCAN2_intr0_IRQHandler - IRQ FDCAN2_intr1_IRQHandler - IRQ FDCAN3_intr0_IRQHandler - IRQ FDCAN3_intr1_IRQHandler - IRQ RNG_IRQHandler - IRQ LPUART_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ DMAMUX_OVR_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ DMA1_CH8_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ DMA2_CH7_IRQHandler - IRQ DMA2_CH8_IRQHandler - IRQ Cordic_IRQHandler - IRQ FMAC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g474xx.go b/device/stm32/stm32g474xx.go index 9ee35ee..d66e2a9 100644 --- a/device/stm32/stm32g474xx.go +++ b/device/stm32/stm32g474xx.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -301,8 +301,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g474xx.s b/device/stm32/stm32g474xx.s deleted file mode 100644 index d637da6..0000000 --- a/device/stm32/stm32g474xx.s +++ /dev/null @@ -1,270 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g474.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G474xx -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_2_IRQHandler - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long fdcan1_intr1_it_IRQHandler - .long fdcan1_intr0_it_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long USBWakeUP_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long FMC_IRQHandler - .long LPTIM1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long ADC4_IRQHandler - .long ADC5_IRQHandler - .long UCPD1_IRQHandler - .long COMP1_2_3_IRQHandler - .long COMP4_5_6_IRQHandler - .long COMP7_IRQHandler - .long HRTIM_Master_IRQn_IRQHandler - .long HRTIM_TIMA_IRQn_IRQHandler - .long HRTIM_TIMB_IRQn_IRQHandler - .long HRTIM_TIMC_IRQn_IRQHandler - .long HRTIM_TIMD_IRQn_IRQHandler - .long HRTIM_TIME_IRQn_IRQHandler - .long HRTIM_TIM_FLT_IRQn_IRQHandler - .long HRTIM_TIMF_IRQn_IRQHandler - .long CRS_IRQHandler - .long SAI_IRQHandler - .long TIM20_BRK_IRQHandler - .long TIM20_UP_IRQHandler - .long TIM20_TRG_COM_IRQHandler - .long TIM20_CC_IRQHandler - .long FPU_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPI4_IRQHandler - .long 0 - .long FDCAN2_intr0_IRQHandler - .long FDCAN2_intr1_IRQHandler - .long FDCAN3_intr0_IRQHandler - .long FDCAN3_intr1_IRQHandler - .long RNG_IRQHandler - .long LPUART_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long DMAMUX_OVR_IRQHandler - .long QUADSPI_IRQHandler - .long DMA1_CH8_IRQHandler - .long DMA2_CH6_IRQHandler - .long DMA2_CH7_IRQHandler - .long DMA2_CH8_IRQHandler - .long Cordic_IRQHandler - .long FMAC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ fdcan1_intr1_it_IRQHandler - IRQ fdcan1_intr0_it_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ USBWakeUP_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ FMC_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ ADC4_IRQHandler - IRQ ADC5_IRQHandler - IRQ UCPD1_IRQHandler - IRQ COMP1_2_3_IRQHandler - IRQ COMP4_5_6_IRQHandler - IRQ COMP7_IRQHandler - IRQ HRTIM_Master_IRQn_IRQHandler - IRQ HRTIM_TIMA_IRQn_IRQHandler - IRQ HRTIM_TIMB_IRQn_IRQHandler - IRQ HRTIM_TIMC_IRQn_IRQHandler - IRQ HRTIM_TIMD_IRQn_IRQHandler - IRQ HRTIM_TIME_IRQn_IRQHandler - IRQ HRTIM_TIM_FLT_IRQn_IRQHandler - IRQ HRTIM_TIMF_IRQn_IRQHandler - IRQ CRS_IRQHandler - IRQ SAI_IRQHandler - IRQ TIM20_BRK_IRQHandler - IRQ TIM20_UP_IRQHandler - IRQ TIM20_TRG_COM_IRQHandler - IRQ TIM20_CC_IRQHandler - IRQ FPU_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPI4_IRQHandler - IRQ FDCAN2_intr0_IRQHandler - IRQ FDCAN2_intr1_IRQHandler - IRQ FDCAN3_intr0_IRQHandler - IRQ FDCAN3_intr1_IRQHandler - IRQ RNG_IRQHandler - IRQ LPUART_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ DMAMUX_OVR_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ DMA1_CH8_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ DMA2_CH7_IRQHandler - IRQ DMA2_CH8_IRQHandler - IRQ Cordic_IRQHandler - IRQ FMAC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g483xx.go b/device/stm32/stm32g483xx.go index 18ce70c..1e788ca 100644 --- a/device/stm32/stm32g483xx.go +++ b/device/stm32/stm32g483xx.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -280,8 +280,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g483xx.s b/device/stm32/stm32g483xx.s deleted file mode 100644 index 63ad62f..0000000 --- a/device/stm32/stm32g483xx.s +++ /dev/null @@ -1,263 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g483.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G483xx -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_2_IRQHandler - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long fdcan1_intr1_it_IRQHandler - .long fdcan1_intr0_it_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long USBWakeUP_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long FMC_IRQHandler - .long LPTIM1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long ADC4_IRQHandler - .long ADC5_IRQHandler - .long UCPD1_IRQHandler - .long COMP1_2_3_IRQHandler - .long COMP4_5_6_IRQHandler - .long COMP7_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CRS_IRQHandler - .long SAI_IRQHandler - .long TIM20_BRK_IRQHandler - .long TIM20_UP_IRQHandler - .long TIM20_TRG_COM_IRQHandler - .long TIM20_CC_IRQHandler - .long FPU_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPI4_IRQHandler - .long AES_IRQHandler - .long FDCAN2_intr0_IRQHandler - .long FDCAN2_intr1_IRQHandler - .long FDCAN3_intr0_IRQHandler - .long FDCAN3_intr1_IRQHandler - .long RNG_IRQHandler - .long LPUART_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long DMAMUX_OVR_IRQHandler - .long QUADSPI_IRQHandler - .long DMA1_CH8_IRQHandler - .long DMA2_CH6_IRQHandler - .long DMA2_CH7_IRQHandler - .long DMA2_CH8_IRQHandler - .long Cordic_IRQHandler - .long FMAC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ fdcan1_intr1_it_IRQHandler - IRQ fdcan1_intr0_it_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ USBWakeUP_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ FMC_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ ADC4_IRQHandler - IRQ ADC5_IRQHandler - IRQ UCPD1_IRQHandler - IRQ COMP1_2_3_IRQHandler - IRQ COMP4_5_6_IRQHandler - IRQ COMP7_IRQHandler - IRQ CRS_IRQHandler - IRQ SAI_IRQHandler - IRQ TIM20_BRK_IRQHandler - IRQ TIM20_UP_IRQHandler - IRQ TIM20_TRG_COM_IRQHandler - IRQ TIM20_CC_IRQHandler - IRQ FPU_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPI4_IRQHandler - IRQ AES_IRQHandler - IRQ FDCAN2_intr0_IRQHandler - IRQ FDCAN2_intr1_IRQHandler - IRQ FDCAN3_intr0_IRQHandler - IRQ FDCAN3_intr1_IRQHandler - IRQ RNG_IRQHandler - IRQ LPUART_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ DMAMUX_OVR_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ DMA1_CH8_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ DMA2_CH7_IRQHandler - IRQ DMA2_CH8_IRQHandler - IRQ Cordic_IRQHandler - IRQ FMAC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g484xx.go b/device/stm32/stm32g484xx.go index 659487f..3917b12 100644 --- a/device/stm32/stm32g484xx.go +++ b/device/stm32/stm32g484xx.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -304,8 +304,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g484xx.s b/device/stm32/stm32g484xx.s deleted file mode 100644 index c439933..0000000 --- a/device/stm32/stm32g484xx.s +++ /dev/null @@ -1,271 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g484.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G484xx -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_2_IRQHandler - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long fdcan1_intr1_it_IRQHandler - .long fdcan1_intr0_it_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long USBWakeUP_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long FMC_IRQHandler - .long LPTIM1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long ADC4_IRQHandler - .long ADC5_IRQHandler - .long UCPD1_IRQHandler - .long COMP1_2_3_IRQHandler - .long COMP4_5_6_IRQHandler - .long COMP7_IRQHandler - .long HRTIM_Master_IRQn_IRQHandler - .long HRTIM_TIMA_IRQn_IRQHandler - .long HRTIM_TIMB_IRQn_IRQHandler - .long HRTIM_TIMC_IRQn_IRQHandler - .long HRTIM_TIMD_IRQn_IRQHandler - .long HRTIM_TIME_IRQn_IRQHandler - .long HRTIM_TIM_FLT_IRQn_IRQHandler - .long HRTIM_TIMF_IRQn_IRQHandler - .long CRS_IRQHandler - .long SAI_IRQHandler - .long TIM20_BRK_IRQHandler - .long TIM20_UP_IRQHandler - .long TIM20_TRG_COM_IRQHandler - .long TIM20_CC_IRQHandler - .long FPU_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPI4_IRQHandler - .long AES_IRQHandler - .long FDCAN2_intr0_IRQHandler - .long FDCAN2_intr1_IRQHandler - .long FDCAN3_intr0_IRQHandler - .long FDCAN3_intr1_IRQHandler - .long RNG_IRQHandler - .long LPUART_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long DMAMUX_OVR_IRQHandler - .long QUADSPI_IRQHandler - .long DMA1_CH8_IRQHandler - .long DMA2_CH6_IRQHandler - .long DMA2_CH7_IRQHandler - .long DMA2_CH8_IRQHandler - .long Cordic_IRQHandler - .long FMAC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ fdcan1_intr1_it_IRQHandler - IRQ fdcan1_intr0_it_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ USBWakeUP_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ FMC_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ ADC4_IRQHandler - IRQ ADC5_IRQHandler - IRQ UCPD1_IRQHandler - IRQ COMP1_2_3_IRQHandler - IRQ COMP4_5_6_IRQHandler - IRQ COMP7_IRQHandler - IRQ HRTIM_Master_IRQn_IRQHandler - IRQ HRTIM_TIMA_IRQn_IRQHandler - IRQ HRTIM_TIMB_IRQn_IRQHandler - IRQ HRTIM_TIMC_IRQn_IRQHandler - IRQ HRTIM_TIMD_IRQn_IRQHandler - IRQ HRTIM_TIME_IRQn_IRQHandler - IRQ HRTIM_TIM_FLT_IRQn_IRQHandler - IRQ HRTIM_TIMF_IRQn_IRQHandler - IRQ CRS_IRQHandler - IRQ SAI_IRQHandler - IRQ TIM20_BRK_IRQHandler - IRQ TIM20_UP_IRQHandler - IRQ TIM20_TRG_COM_IRQHandler - IRQ TIM20_CC_IRQHandler - IRQ FPU_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPI4_IRQHandler - IRQ AES_IRQHandler - IRQ FDCAN2_intr0_IRQHandler - IRQ FDCAN2_intr1_IRQHandler - IRQ FDCAN3_intr0_IRQHandler - IRQ FDCAN3_intr1_IRQHandler - IRQ RNG_IRQHandler - IRQ LPUART_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ DMAMUX_OVR_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ DMA1_CH8_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ DMA2_CH7_IRQHandler - IRQ DMA2_CH8_IRQHandler - IRQ Cordic_IRQHandler - IRQ FMAC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g491xx.go b/device/stm32/stm32g491xx.go index adad010..8398d46 100644 --- a/device/stm32/stm32g491xx.go +++ b/device/stm32/stm32g491xx.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -226,8 +226,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g491xx.s b/device/stm32/stm32g491xx.s deleted file mode 100644 index 706a965..0000000 --- a/device/stm32/stm32g491xx.s +++ /dev/null @@ -1,241 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g491.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G491xx -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long 0 - .long ADC1_2_IRQHandler - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long fdcan1_intr1_it_IRQHandler - .long fdcan1_intr0_it_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long USBWakeUP_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long 0 - .long LPTIM1_IRQHandler - .long 0 - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long 0 - .long 0 - .long UCPD1_IRQHandler - .long COMP1_2_3_IRQHandler - .long COMP4_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CRS_IRQHandler - .long SAI_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long FPU_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long RNG_IRQHandler - .long LPUART_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long DMAMUX_OVR_IRQHandler - .long 0 - .long 0 - .long DMA2_CH6_IRQHandler - .long 0 - .long 0 - .long Cordic_IRQHandler - .long FMAC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ fdcan1_intr1_it_IRQHandler - IRQ fdcan1_intr0_it_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ USBWakeUP_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ UCPD1_IRQHandler - IRQ COMP1_2_3_IRQHandler - IRQ COMP4_IRQHandler - IRQ CRS_IRQHandler - IRQ SAI_IRQHandler - IRQ FPU_IRQHandler - IRQ RNG_IRQHandler - IRQ LPUART_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ DMAMUX_OVR_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ Cordic_IRQHandler - IRQ FMAC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32g4a1xx.go b/device/stm32/stm32g4a1xx.go index 2017d27..c3cc667 100644 --- a/device/stm32/stm32g4a1xx.go +++ b/device/stm32/stm32g4a1xx.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -229,8 +229,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32g4a1xx.s b/device/stm32/stm32g4a1xx.s deleted file mode 100644 index 66e6142..0000000 --- a/device/stm32/stm32g4a1xx.s +++ /dev/null @@ -1,242 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32g4a1.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32G4A1xx -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long 0 - .long ADC1_2_IRQHandler - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long fdcan1_intr1_it_IRQHandler - .long fdcan1_intr0_it_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long USBWakeUP_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long 0 - .long LPTIM1_IRQHandler - .long 0 - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long 0 - .long 0 - .long UCPD1_IRQHandler - .long COMP1_2_3_IRQHandler - .long COMP4_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long CRS_IRQHandler - .long SAI_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long FPU_IRQHandler - .long 0 - .long 0 - .long 0 - .long AES_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long RNG_IRQHandler - .long LPUART_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long DMAMUX_OVR_IRQHandler - .long 0 - .long 0 - .long DMA2_CH6_IRQHandler - .long 0 - .long 0 - .long Cordic_IRQHandler - .long FMAC_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ fdcan1_intr1_it_IRQHandler - IRQ fdcan1_intr0_it_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ USBWakeUP_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ UCPD1_IRQHandler - IRQ COMP1_2_3_IRQHandler - IRQ COMP4_IRQHandler - IRQ CRS_IRQHandler - IRQ SAI_IRQHandler - IRQ FPU_IRQHandler - IRQ AES_IRQHandler - IRQ RNG_IRQHandler - IRQ LPUART_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ DMAMUX_OVR_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ Cordic_IRQHandler - IRQ FMAC_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32h73x.go b/device/stm32/stm32h73x.go index 1134bac..e04773e 100644 --- a/device/stm32/stm32h73x.go +++ b/device/stm32/stm32h73x.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -374,8 +374,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG1_IRQHandler func interruptWWDG1() { diff --git a/device/stm32/stm32h73x.s b/device/stm32/stm32h73x.s deleted file mode 100644 index c8ea0c6..0000000 --- a/device/stm32/stm32h73x.s +++ /dev/null @@ -1,346 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32h735.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32H73x -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG1_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_STAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA_STR0_IRQHandler - .long DMA_STR1_IRQHandler - .long DMA_STR2_IRQHandler - .long DMA_STR3_IRQHandler - .long DMA_STR4_IRQHandler - .long DMA_STR5_IRQHandler - .long DMA_STR6_IRQHandler - .long ADC1_2_IRQHandler - .long FDCAN1_IT0_IRQHandler - .long FDCAN2_IT0_IRQHandler - .long FDCAN1_IT1_IRQHandler - .long FDCAN2_IT1_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_IRQHandler - .long TIM1_UP_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long 0 - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_STR7_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_STR0_IRQHandler - .long DMA2_STR1_IRQHandler - .long DMA2_STR2_IRQHandler - .long DMA2_STR3_IRQHandler - .long DMA2_STR4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long FDCAN_CAL_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA2_STR5_IRQHandler - .long DMA2_STR6_IRQHandler - .long DMA2_STR7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long 0 - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LTDC_IRQHandler - .long LTDC_ER_IRQHandler - .long DMA2D_IRQHandler - .long 0 - .long OCTOSPI1_IRQHandler - .long LPTIM1_IRQHandler - .long CEC_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPDIF_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long DMAMUX1_OV_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long 0 - .long SWPMI1_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long MDIOS_WKUP_IRQHandler - .long MDIOS_IRQHandler - .long 0 - .long MDMA_IRQHandler - .long 0 - .long SDMMC2_IRQHandler - .long HSEM0_IRQHandler - .long 0 - .long ADC3_IRQHandler - .long DMAMUX2_OVR_IRQHandler - .long BDMA_CH0_IRQHandler - .long BDMA_CH1_IRQHandler - .long BDMA_CH2_IRQHandler - .long BDMA_CH3_IRQHandler - .long BDMA_CH4_IRQHandler - .long BDMA_CH5_IRQHandler - .long BDMA_CH6_IRQHandler - .long BDMA_CH7_IRQHandler - .long COMP_IRQHandler - .long LPTIM2_IRQHandler - .long LPTIM3_IRQHandler - .long LPTIM4_IRQHandler - .long LPTIM5_IRQHandler - .long LPUART_IRQHandler - .long 0 - .long CRS_IRQHandler - .long 0 - .long SAI4_IRQHandler - .long 0 - .long 0 - .long WKUP_IRQHandler - .long OCTOSPI2_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG1_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_STAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA_STR0_IRQHandler - IRQ DMA1_STR0_IRQHandler - IRQ DMA_STR1_IRQHandler - IRQ DMA1_STR1_IRQHandler - IRQ DMA_STR2_IRQHandler - IRQ DMA1_STR2_IRQHandler - IRQ DMA_STR3_IRQHandler - IRQ DMA1_STR3_IRQHandler - IRQ DMA_STR4_IRQHandler - IRQ DMA1_STR4_IRQHandler - IRQ DMA_STR5_IRQHandler - IRQ DMA1_STR5_IRQHandler - IRQ DMA_STR6_IRQHandler - IRQ DMA1_STR6_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ FDCAN1_IT0_IRQHandler - IRQ FDCAN2_IT0_IRQHandler - IRQ FDCAN1_IT1_IRQHandler - IRQ FDCAN2_IT1_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_IRQHandler - IRQ TIM1_UP_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_STR7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_STR0_IRQHandler - IRQ DMA2_STR1_IRQHandler - IRQ DMA2_STR2_IRQHandler - IRQ DMA2_STR3_IRQHandler - IRQ DMA2_STR4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ FDCAN_CAL_IRQHandler - IRQ DMA2_STR5_IRQHandler - IRQ DMA2_STR6_IRQHandler - IRQ DMA2_STR7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LTDC_IRQHandler - IRQ LTDC_ER_IRQHandler - IRQ DMA2D_IRQHandler - IRQ OCTOSPI1_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ CEC_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPDIF_IRQHandler - IRQ DMAMUX1_OV_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ SWPMI1_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ MDIOS_WKUP_IRQHandler - IRQ MDIOS_IRQHandler - IRQ MDMA_IRQHandler - IRQ SDMMC2_IRQHandler - IRQ HSEM0_IRQHandler - IRQ ADC3_IRQHandler - IRQ DMAMUX2_OVR_IRQHandler - IRQ BDMA_CH0_IRQHandler - IRQ BDMA_CH1_IRQHandler - IRQ BDMA_CH2_IRQHandler - IRQ BDMA_CH3_IRQHandler - IRQ BDMA_CH4_IRQHandler - IRQ BDMA_CH5_IRQHandler - IRQ BDMA_CH6_IRQHandler - IRQ BDMA_CH7_IRQHandler - IRQ COMP_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ LPTIM3_IRQHandler - IRQ LPTIM4_IRQHandler - IRQ LPTIM5_IRQHandler - IRQ LPUART_IRQHandler - IRQ CRS_IRQHandler - IRQ SAI4_IRQHandler - IRQ WKUP_IRQHandler - IRQ OCTOSPI2_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32h743.go b/device/stm32/stm32h743.go index ad74a6f..b752d3a 100644 --- a/device/stm32/stm32h743.go +++ b/device/stm32/stm32h743.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -405,8 +405,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG1_IRQHandler func interruptWWDG1() { diff --git a/device/stm32/stm32h743.s b/device/stm32/stm32h743.s deleted file mode 100644 index 0745a90..0000000 --- a/device/stm32/stm32h743.s +++ /dev/null @@ -1,358 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32h743v.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32H743 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG1_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_STAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA_STR0_IRQHandler - .long DMA_STR1_IRQHandler - .long DMA1_STR2_IRQHandler - .long DMA1_STR3_IRQHandler - .long DMA1_STR4_IRQHandler - .long DMA1_STR5_IRQHandler - .long DMA1_STR6_IRQHandler - .long ADC1_2_IRQHandler - .long FDCAN1_IT0_IRQHandler - .long FDCAN2_IT0_IRQHandler - .long FDCAN1_IT1_IRQHandler - .long FDCAN2_IT1_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_IRQHandler - .long TIM1_UP_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long 0 - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_STR7_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_STR0_IRQHandler - .long DMA2_STR1_IRQHandler - .long DMA2_STR2_IRQHandler - .long DMA2_STR3_IRQHandler - .long DMA2_STR4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long FDCAN_CAL_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA2_STR5_IRQHandler - .long DMA2_STR6_IRQHandler - .long DMA2_STR7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long 0 - .long 0 - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LTDC_IRQHandler - .long LTDC_ER_IRQHandler - .long DMA2D_IRQHandler - .long SAI2_IRQHandler - .long QUADSPI_IRQHandler - .long LPTIM1_IRQHandler - .long CEC_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPDIF_IRQHandler - .long OTG_FS_EP1_OUT_IRQHandler - .long OTG_FS_EP1_IN_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long OTG_FS_IRQHandler - .long DMAMUX1_OV_IRQHandler - .long HRTIM1_MST_IRQHandler - .long HRTIM1_TIMA_IRQHandler - .long HRTIM_TIMB_IRQHandler - .long HRTIM1_TIMC_IRQHandler - .long HRTIM1_TIMD_IRQHandler - .long HRTIM_TIME_IRQHandler - .long HRTIM1_FLT_IRQHandler - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long SAI3_IRQHandler - .long SWPMI1_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long MDIOS_WKUP_IRQHandler - .long MDIOS_IRQHandler - .long JPEG_IRQHandler - .long MDMA_IRQHandler - .long 0 - .long SDMMC_IRQHandler - .long HSEM0_IRQHandler - .long 0 - .long ADC3_IRQHandler - .long DMAMUX2_OVR_IRQHandler - .long BDMA_CH1_IRQHandler - .long BDMA_CH2_IRQHandler - .long BDMA_CH3_IRQHandler - .long BDMA_CH4_IRQHandler - .long BDMA_CH5_IRQHandler - .long BDMA_CH6_IRQHandler - .long BDMA_CH7_IRQHandler - .long BDMA_CH8_IRQHandler - .long COMP_IRQHandler - .long LPTIM2_IRQHandler - .long LPTIM3_IRQHandler - .long LPTIM4_IRQHandler - .long LPTIM5_IRQHandler - .long LPUART_IRQHandler - .long WWDG1_RST_IRQHandler - .long CRS_IRQHandler - .long RAMECC_IRQHandler - .long SAI4_IRQHandler - .long 0 - .long 0 - .long WKUP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG1_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_STAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA_STR0_IRQHandler - IRQ DMA1_STR0_IRQHandler - IRQ DMA_STR1_IRQHandler - IRQ DMA1_STR1_IRQHandler - IRQ DMA1_STR2_IRQHandler - IRQ DMA1_STR3_IRQHandler - IRQ DMA1_STR4_IRQHandler - IRQ DMA1_STR5_IRQHandler - IRQ DMA1_STR6_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ FDCAN1_IT0_IRQHandler - IRQ FDCAN2_IT0_IRQHandler - IRQ FDCAN1_IT1_IRQHandler - IRQ FDCAN2_IT1_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_IRQHandler - IRQ TIM1_UP_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_STR7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_STR0_IRQHandler - IRQ DMA2_STR1_IRQHandler - IRQ DMA2_STR2_IRQHandler - IRQ DMA2_STR3_IRQHandler - IRQ DMA2_STR4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ FDCAN_CAL_IRQHandler - IRQ DMA2_STR5_IRQHandler - IRQ DMA2_STR6_IRQHandler - IRQ DMA2_STR7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LTDC_IRQHandler - IRQ LTDC_ER_IRQHandler - IRQ DMA2D_IRQHandler - IRQ SAI2_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ CEC_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPDIF_IRQHandler - IRQ OTG_FS_EP1_OUT_IRQHandler - IRQ OTG_FS_EP1_IN_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMAMUX1_OV_IRQHandler - IRQ HRTIM1_MST_IRQHandler - IRQ HRTIM1_TIMA_IRQHandler - IRQ HRTIM_TIMB_IRQHandler - IRQ HRTIM1_TIMC_IRQHandler - IRQ HRTIM1_TIMD_IRQHandler - IRQ HRTIM_TIME_IRQHandler - IRQ HRTIM1_FLT_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ SAI3_IRQHandler - IRQ SWPMI1_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ MDIOS_WKUP_IRQHandler - IRQ MDIOS_IRQHandler - IRQ JPEG_IRQHandler - IRQ MDMA_IRQHandler - IRQ SDMMC_IRQHandler - IRQ HSEM0_IRQHandler - IRQ ADC3_IRQHandler - IRQ DMAMUX2_OVR_IRQHandler - IRQ BDMA_CH1_IRQHandler - IRQ BDMA_CH2_IRQHandler - IRQ BDMA_CH3_IRQHandler - IRQ BDMA_CH4_IRQHandler - IRQ BDMA_CH5_IRQHandler - IRQ BDMA_CH6_IRQHandler - IRQ BDMA_CH7_IRQHandler - IRQ BDMA_CH8_IRQHandler - IRQ COMP_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ LPTIM3_IRQHandler - IRQ LPTIM4_IRQHandler - IRQ LPTIM5_IRQHandler - IRQ LPUART_IRQHandler - IRQ WWDG1_RST_IRQHandler - IRQ CRS_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SAI4_IRQHandler - IRQ WKUP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32h753.go b/device/stm32/stm32h753.go index 1b48301..fef12f5 100644 --- a/device/stm32/stm32h753.go +++ b/device/stm32/stm32h753.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -411,8 +411,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG1_IRQHandler func interruptWWDG1() { diff --git a/device/stm32/stm32h753.s b/device/stm32/stm32h753.s deleted file mode 100644 index d116226..0000000 --- a/device/stm32/stm32h753.s +++ /dev/null @@ -1,360 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32h753v.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32H753 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG1_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_STAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA_STR0_IRQHandler - .long DMA_STR1_IRQHandler - .long DMA1_STR2_IRQHandler - .long DMA1_STR3_IRQHandler - .long DMA1_STR4_IRQHandler - .long DMA1_STR5_IRQHandler - .long DMA1_STR6_IRQHandler - .long ADC1_2_IRQHandler - .long FDCAN1_IT0_IRQHandler - .long FDCAN2_IT0_IRQHandler - .long FDCAN1_IT1_IRQHandler - .long FDCAN2_IT1_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_IRQHandler - .long TIM1_UP_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long 0 - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_STR7_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_STR0_IRQHandler - .long DMA2_STR1_IRQHandler - .long DMA2_STR2_IRQHandler - .long DMA2_STR3_IRQHandler - .long DMA2_STR4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long FDCAN_CAL_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA2_STR5_IRQHandler - .long DMA2_STR6_IRQHandler - .long DMA2_STR7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LTDC_IRQHandler - .long LTDC_ER_IRQHandler - .long DMA2D_IRQHandler - .long SAI2_IRQHandler - .long QUADSPI_IRQHandler - .long LPTIM1_IRQHandler - .long CEC_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPDIF_IRQHandler - .long OTG_FS_EP1_OUT_IRQHandler - .long OTG_FS_EP1_IN_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long OTG_FS_IRQHandler - .long DMAMUX1_OV_IRQHandler - .long HRTIM1_MST_IRQHandler - .long HRTIM1_TIMA_IRQHandler - .long HRTIM_TIMB_IRQHandler - .long HRTIM1_TIMC_IRQHandler - .long HRTIM1_TIMD_IRQHandler - .long HRTIM_TIME_IRQHandler - .long HRTIM1_FLT_IRQHandler - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long SAI3_IRQHandler - .long SWPMI1_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long MDIOS_WKUP_IRQHandler - .long MDIOS_IRQHandler - .long JPEG_IRQHandler - .long MDMA_IRQHandler - .long 0 - .long SDMMC_IRQHandler - .long HSEM0_IRQHandler - .long 0 - .long ADC3_IRQHandler - .long DMAMUX2_OVR_IRQHandler - .long BDMA_CH1_IRQHandler - .long BDMA_CH2_IRQHandler - .long BDMA_CH3_IRQHandler - .long BDMA_CH4_IRQHandler - .long BDMA_CH5_IRQHandler - .long BDMA_CH6_IRQHandler - .long BDMA_CH7_IRQHandler - .long BDMA_CH8_IRQHandler - .long COMP_IRQHandler - .long LPTIM2_IRQHandler - .long LPTIM3_IRQHandler - .long LPTIM4_IRQHandler - .long LPTIM5_IRQHandler - .long LPUART_IRQHandler - .long WWDG1_RST_IRQHandler - .long CRS_IRQHandler - .long RAMECC_IRQHandler - .long SAI4_IRQHandler - .long 0 - .long 0 - .long WKUP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG1_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_STAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA_STR0_IRQHandler - IRQ DMA1_STR0_IRQHandler - IRQ DMA_STR1_IRQHandler - IRQ DMA1_STR1_IRQHandler - IRQ DMA1_STR2_IRQHandler - IRQ DMA1_STR3_IRQHandler - IRQ DMA1_STR4_IRQHandler - IRQ DMA1_STR5_IRQHandler - IRQ DMA1_STR6_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ FDCAN1_IT0_IRQHandler - IRQ FDCAN2_IT0_IRQHandler - IRQ FDCAN1_IT1_IRQHandler - IRQ FDCAN2_IT1_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_IRQHandler - IRQ TIM1_UP_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_STR7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_STR0_IRQHandler - IRQ DMA2_STR1_IRQHandler - IRQ DMA2_STR2_IRQHandler - IRQ DMA2_STR3_IRQHandler - IRQ DMA2_STR4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ FDCAN_CAL_IRQHandler - IRQ DMA2_STR5_IRQHandler - IRQ DMA2_STR6_IRQHandler - IRQ DMA2_STR7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LTDC_IRQHandler - IRQ LTDC_ER_IRQHandler - IRQ DMA2D_IRQHandler - IRQ SAI2_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ CEC_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPDIF_IRQHandler - IRQ OTG_FS_EP1_OUT_IRQHandler - IRQ OTG_FS_EP1_IN_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMAMUX1_OV_IRQHandler - IRQ HRTIM1_MST_IRQHandler - IRQ HRTIM1_TIMA_IRQHandler - IRQ HRTIM_TIMB_IRQHandler - IRQ HRTIM1_TIMC_IRQHandler - IRQ HRTIM1_TIMD_IRQHandler - IRQ HRTIM_TIME_IRQHandler - IRQ HRTIM1_FLT_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ SAI3_IRQHandler - IRQ SWPMI1_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ MDIOS_WKUP_IRQHandler - IRQ MDIOS_IRQHandler - IRQ JPEG_IRQHandler - IRQ MDMA_IRQHandler - IRQ SDMMC_IRQHandler - IRQ HSEM0_IRQHandler - IRQ ADC3_IRQHandler - IRQ DMAMUX2_OVR_IRQHandler - IRQ BDMA_CH1_IRQHandler - IRQ BDMA_CH2_IRQHandler - IRQ BDMA_CH3_IRQHandler - IRQ BDMA_CH4_IRQHandler - IRQ BDMA_CH5_IRQHandler - IRQ BDMA_CH6_IRQHandler - IRQ BDMA_CH7_IRQHandler - IRQ BDMA_CH8_IRQHandler - IRQ COMP_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ LPTIM3_IRQHandler - IRQ LPTIM4_IRQHandler - IRQ LPTIM5_IRQHandler - IRQ LPUART_IRQHandler - IRQ WWDG1_RST_IRQHandler - IRQ CRS_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SAI4_IRQHandler - IRQ WKUP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32h757_cm4.go b/device/stm32/stm32h757_cm4.go index 68b84da..01d338f 100644 --- a/device/stm32/stm32h757_cm4.go +++ b/device/stm32/stm32h757_cm4.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -434,8 +434,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG2_IRQHandler func interruptWWDG2() { diff --git a/device/stm32/stm32h757_cm4.s b/device/stm32/stm32h757_cm4.s deleted file mode 100644 index 482d210..0000000 --- a/device/stm32/stm32h757_cm4.s +++ /dev/null @@ -1,367 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32h747cm4.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32H757_CM4 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG2_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_STAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long 0 - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA_STR0_IRQHandler - .long DMA_STR1_IRQHandler - .long DMA_STR2_IRQHandler - .long DMA_STR3_IRQHandler - .long DMA_STR4_IRQHandler - .long DMA_STR5_IRQHandler - .long DMA_STR6_IRQHandler - .long ADC1_2_IRQHandler - .long FDCAN1_IT0_IRQHandler - .long FDCAN2_IT0_IRQHandler - .long FDCAN1_IT1_IRQHandler - .long FDCAN2_IT1_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_IRQHandler - .long TIM1_UP_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long 0 - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_STR7_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_STR0_IRQHandler - .long DMA2_STR1_IRQHandler - .long DMA2_STR2_IRQHandler - .long DMA2_STR3_IRQHandler - .long DMA2_STR4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long FDCAN_CAL_IRQHandler - .long cm7_sev_it_IRQHandler - .long 0 - .long 0 - .long 0 - .long DMA2_STR5_IRQHandler - .long DMA2_STR6_IRQHandler - .long DMA2_STR7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LTDC_IRQHandler - .long LTDC_ER_IRQHandler - .long DMA2D_IRQHandler - .long SAI2_IRQHandler - .long QUADSPI_IRQHandler - .long LPTIM1_IRQHandler - .long CEC_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPDIF_IRQHandler - .long OTG_FS_EP1_OUT_IRQHandler - .long OTG_FS_EP1_IN_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long OTG_FS_IRQHandler - .long DMAMUX1_OV_IRQHandler - .long HRTIM1_MST_IRQHandler - .long HRTIM1_TIMA_IRQHandler - .long HRTIM_TIMB_IRQHandler - .long HRTIM1_TIMC_IRQHandler - .long HRTIM1_TIMD_IRQHandler - .long HRTIM_TIME_IRQHandler - .long HRTIM1_FLT_IRQHandler - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long SAI3_IRQHandler - .long SWPMI1_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long MDIOS_WKUP_IRQHandler - .long MDIOS_IRQHandler - .long JPEG_IRQHandler - .long MDMA_IRQHandler - .long DSI_IRQHandler - .long SDMMC_IRQHandler - .long HSEM0_IRQHandler - .long 0 - .long ADC3_IRQHandler - .long DMAMUX2_OVR_IRQHandler - .long BDMA_CH1_IRQHandler - .long BDMA_CH2_IRQHandler - .long BDMA_CH3_IRQHandler - .long BDMA_CH4_IRQHandler - .long BDMA_CH5_IRQHandler - .long BDMA_CH6_IRQHandler - .long BDMA_CH7_IRQHandler - .long BDMA_CH8_IRQHandler - .long COMP_IRQHandler - .long LPTIM2_IRQHandler - .long LPTIM3_IRQHandler - .long LPTIM4_IRQHandler - .long LPTIM5_IRQHandler - .long LPUART_IRQHandler - .long WWDG1_RST_IRQHandler - .long CRS_IRQHandler - .long RAMECC_IRQHandler - .long SAI4_IRQHandler - .long 0 - .long HOLD_CORE_IRQHandler - .long WKUP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG2_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_STAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA_STR0_IRQHandler - IRQ DMA1_STR0_IRQHandler - IRQ DMA_STR1_IRQHandler - IRQ DMA1_STR1_IRQHandler - IRQ DMA_STR2_IRQHandler - IRQ DMA1_STR2_IRQHandler - IRQ DMA_STR3_IRQHandler - IRQ DMA1_STR3_IRQHandler - IRQ DMA_STR4_IRQHandler - IRQ DMA1_STR4_IRQHandler - IRQ DMA_STR5_IRQHandler - IRQ DMA1_STR5_IRQHandler - IRQ DMA_STR6_IRQHandler - IRQ DMA1_STR6_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ FDCAN1_IT0_IRQHandler - IRQ FDCAN2_IT0_IRQHandler - IRQ FDCAN1_IT1_IRQHandler - IRQ FDCAN2_IT1_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_IRQHandler - IRQ TIM1_UP_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_STR7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_STR0_IRQHandler - IRQ DMA2_STR1_IRQHandler - IRQ DMA2_STR2_IRQHandler - IRQ DMA2_STR3_IRQHandler - IRQ DMA2_STR4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ FDCAN_CAL_IRQHandler - IRQ cm7_sev_it_IRQHandler - IRQ DMA2_STR5_IRQHandler - IRQ DMA2_STR6_IRQHandler - IRQ DMA2_STR7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LTDC_IRQHandler - IRQ LTDC_ER_IRQHandler - IRQ DMA2D_IRQHandler - IRQ SAI2_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ CEC_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPDIF_IRQHandler - IRQ OTG_FS_EP1_OUT_IRQHandler - IRQ OTG_FS_EP1_IN_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMAMUX1_OV_IRQHandler - IRQ HRTIM1_MST_IRQHandler - IRQ HRTIM1_TIMA_IRQHandler - IRQ HRTIM_TIMB_IRQHandler - IRQ HRTIM1_TIMC_IRQHandler - IRQ HRTIM1_TIMD_IRQHandler - IRQ HRTIM_TIME_IRQHandler - IRQ HRTIM1_FLT_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ SAI3_IRQHandler - IRQ SWPMI1_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ MDIOS_WKUP_IRQHandler - IRQ MDIOS_IRQHandler - IRQ JPEG_IRQHandler - IRQ MDMA_IRQHandler - IRQ DSI_IRQHandler - IRQ SDMMC_IRQHandler - IRQ HSEM0_IRQHandler - IRQ ADC3_IRQHandler - IRQ DMAMUX2_OVR_IRQHandler - IRQ BDMA_CH1_IRQHandler - IRQ BDMA_CH2_IRQHandler - IRQ BDMA_CH3_IRQHandler - IRQ BDMA_CH4_IRQHandler - IRQ BDMA_CH5_IRQHandler - IRQ BDMA_CH6_IRQHandler - IRQ BDMA_CH7_IRQHandler - IRQ BDMA_CH8_IRQHandler - IRQ COMP_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ LPTIM3_IRQHandler - IRQ LPTIM4_IRQHandler - IRQ LPTIM5_IRQHandler - IRQ LPUART_IRQHandler - IRQ WWDG1_RST_IRQHandler - IRQ CRS_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SAI4_IRQHandler - IRQ HOLD_CORE_IRQHandler - IRQ WKUP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32h757_cm7.go b/device/stm32/stm32h757_cm7.go index d2829b9..b31b84b 100644 --- a/device/stm32/stm32h757_cm7.go +++ b/device/stm32/stm32h757_cm7.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -434,8 +434,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG1_IRQHandler func interruptWWDG1() { diff --git a/device/stm32/stm32h757_cm7.s b/device/stm32/stm32h757_cm7.s deleted file mode 100644 index d73df97..0000000 --- a/device/stm32/stm32h757_cm7.s +++ /dev/null @@ -1,367 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32h747cm7.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32H757_CM7 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG1_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_STAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long 0 - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA_STR0_IRQHandler - .long DMA_STR1_IRQHandler - .long DMA_STR2_IRQHandler - .long DMA_STR3_IRQHandler - .long DMA_STR4_IRQHandler - .long DMA_STR5_IRQHandler - .long DMA_STR6_IRQHandler - .long ADC1_2_IRQHandler - .long FDCAN1_IT0_IRQHandler - .long FDCAN2_IT0_IRQHandler - .long FDCAN1_IT1_IRQHandler - .long FDCAN2_IT1_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_IRQHandler - .long TIM1_UP_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long 0 - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_STR7_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_STR0_IRQHandler - .long DMA2_STR1_IRQHandler - .long DMA2_STR2_IRQHandler - .long DMA2_STR3_IRQHandler - .long DMA2_STR4_IRQHandler - .long ETH_IRQHandler - .long ETH_WKUP_IRQHandler - .long FDCAN_CAL_IRQHandler - .long 0 - .long cm4_sev_it_IRQHandler - .long 0 - .long 0 - .long DMA2_STR5_IRQHandler - .long DMA2_STR6_IRQHandler - .long DMA2_STR7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LTDC_IRQHandler - .long LTDC_ER_IRQHandler - .long DMA2D_IRQHandler - .long SAI2_IRQHandler - .long QUADSPI_IRQHandler - .long LPTIM1_IRQHandler - .long CEC_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPDIF_IRQHandler - .long OTG_FS_EP1_OUT_IRQHandler - .long OTG_FS_EP1_IN_IRQHandler - .long OTG_FS_WKUP_IRQHandler - .long OTG_FS_IRQHandler - .long DMAMUX1_OV_IRQHandler - .long HRTIM1_MST_IRQHandler - .long HRTIM1_TIMA_IRQHandler - .long HRTIM_TIMB_IRQHandler - .long HRTIM1_TIMC_IRQHandler - .long HRTIM1_TIMD_IRQHandler - .long HRTIM_TIME_IRQHandler - .long HRTIM1_FLT_IRQHandler - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long SAI3_IRQHandler - .long SWPMI1_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long MDIOS_WKUP_IRQHandler - .long MDIOS_IRQHandler - .long JPEG_IRQHandler - .long MDMA_IRQHandler - .long DSI_IRQHandler - .long SDMMC_IRQHandler - .long HSEM0_IRQHandler - .long 0 - .long ADC3_IRQHandler - .long DMAMUX2_OVR_IRQHandler - .long BDMA_CH1_IRQHandler - .long BDMA_CH2_IRQHandler - .long BDMA_CH3_IRQHandler - .long BDMA_CH4_IRQHandler - .long BDMA_CH5_IRQHandler - .long BDMA_CH6_IRQHandler - .long BDMA_CH7_IRQHandler - .long BDMA_CH8_IRQHandler - .long COMP_IRQHandler - .long LPTIM2_IRQHandler - .long LPTIM3_IRQHandler - .long LPTIM4_IRQHandler - .long LPTIM5_IRQHandler - .long LPUART_IRQHandler - .long WWDG2_RST_IRQHandler - .long CRS_IRQHandler - .long RAMECC_IRQHandler - .long SAI4_IRQHandler - .long 0 - .long HOLD_CORE_IRQHandler - .long WKUP_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG1_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_STAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA_STR0_IRQHandler - IRQ DMA1_STR0_IRQHandler - IRQ DMA_STR1_IRQHandler - IRQ DMA1_STR1_IRQHandler - IRQ DMA_STR2_IRQHandler - IRQ DMA1_STR2_IRQHandler - IRQ DMA_STR3_IRQHandler - IRQ DMA1_STR3_IRQHandler - IRQ DMA_STR4_IRQHandler - IRQ DMA1_STR4_IRQHandler - IRQ DMA_STR5_IRQHandler - IRQ DMA1_STR5_IRQHandler - IRQ DMA_STR6_IRQHandler - IRQ DMA1_STR6_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ FDCAN1_IT0_IRQHandler - IRQ FDCAN2_IT0_IRQHandler - IRQ FDCAN1_IT1_IRQHandler - IRQ FDCAN2_IT1_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_IRQHandler - IRQ TIM1_UP_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_STR7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_STR0_IRQHandler - IRQ DMA2_STR1_IRQHandler - IRQ DMA2_STR2_IRQHandler - IRQ DMA2_STR3_IRQHandler - IRQ DMA2_STR4_IRQHandler - IRQ ETH_IRQHandler - IRQ ETH_WKUP_IRQHandler - IRQ FDCAN_CAL_IRQHandler - IRQ cm4_sev_it_IRQHandler - IRQ DMA2_STR5_IRQHandler - IRQ DMA2_STR6_IRQHandler - IRQ DMA2_STR7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LTDC_IRQHandler - IRQ LTDC_ER_IRQHandler - IRQ DMA2D_IRQHandler - IRQ SAI2_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ CEC_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPDIF_IRQHandler - IRQ OTG_FS_EP1_OUT_IRQHandler - IRQ OTG_FS_EP1_IN_IRQHandler - IRQ OTG_FS_WKUP_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMAMUX1_OV_IRQHandler - IRQ HRTIM1_MST_IRQHandler - IRQ HRTIM1_TIMA_IRQHandler - IRQ HRTIM_TIMB_IRQHandler - IRQ HRTIM1_TIMC_IRQHandler - IRQ HRTIM1_TIMD_IRQHandler - IRQ HRTIM_TIME_IRQHandler - IRQ HRTIM1_FLT_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ SAI3_IRQHandler - IRQ SWPMI1_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ MDIOS_WKUP_IRQHandler - IRQ MDIOS_IRQHandler - IRQ JPEG_IRQHandler - IRQ MDMA_IRQHandler - IRQ DSI_IRQHandler - IRQ SDMMC_IRQHandler - IRQ HSEM0_IRQHandler - IRQ ADC3_IRQHandler - IRQ DMAMUX2_OVR_IRQHandler - IRQ BDMA_CH1_IRQHandler - IRQ BDMA_CH2_IRQHandler - IRQ BDMA_CH3_IRQHandler - IRQ BDMA_CH4_IRQHandler - IRQ BDMA_CH5_IRQHandler - IRQ BDMA_CH6_IRQHandler - IRQ BDMA_CH7_IRQHandler - IRQ BDMA_CH8_IRQHandler - IRQ COMP_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ LPTIM3_IRQHandler - IRQ LPTIM4_IRQHandler - IRQ LPTIM5_IRQHandler - IRQ LPUART_IRQHandler - IRQ WWDG2_RST_IRQHandler - IRQ CRS_IRQHandler - IRQ RAMECC_IRQHandler - IRQ SAI4_IRQHandler - IRQ HOLD_CORE_IRQHandler - IRQ WKUP_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32h7b3x.go b/device/stm32/stm32h7b3x.go index c400274..0631853 100644 --- a/device/stm32/stm32h7b3x.go +++ b/device/stm32/stm32h7b3x.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -416,8 +416,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32h7b3x.s b/device/stm32/stm32h7b3x.s deleted file mode 100644 index 81ee3ed..0000000 --- a/device/stm32/stm32h7b3x.s +++ /dev/null @@ -1,359 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32h7b3.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32H7B3x -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_STAMP_CSS_LSE_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA_STR0_IRQHandler - .long DMA_STR1_IRQHandler - .long DMA_STR2_IRQHandler - .long DMA_STR3_IRQHandler - .long DMA_STR4_IRQHandler - .long DMA_STR5_IRQHandler - .long DMA_STR6_IRQHandler - .long ADC1_2_IRQHandler - .long FDCAN1_IT0_IRQHandler - .long FDCAN2_IT0_IRQHandler - .long FDCAN1_IT1_IRQHandler - .long FDCAN2_IT1_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_IRQHandler - .long TIM1_UP_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long 0 - .long TIM8_BRK_TIM12_IRQHandler - .long TIM8_UP_TIM13_IRQHandler - .long TIM8_TRG_COM_TIM14_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_STR7_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_STR0_IRQHandler - .long DMA2_STR1_IRQHandler - .long DMA2_STR2_IRQHandler - .long DMA2_STR3_IRQHandler - .long DMA2_STR4_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA2_STR5_IRQHandler - .long DMA2_STR6_IRQHandler - .long DMA2_STR7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long OTG_HS_EP1_OUT_IRQHandler - .long OTG_HS_EP1_IN_IRQHandler - .long OTG_HS_WKUP_IRQHandler - .long OTG_HS_IRQHandler - .long DCMI_PSSI_IRQHandler - .long CRYP_IRQHandler - .long HASH_RNG_IRQHandler - .long FPU_IRQHandler - .long UART7_IRQHandler - .long UART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LTDC_IRQHandler - .long LTDC_ER_IRQHandler - .long DMA2D_IRQHandler - .long SAI2_IRQHandler - .long QUADSPI_IRQHandler - .long LPTIM1_IRQHandler - .long CEC_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long SPDIFRX_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long DMAMUX1_OV_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long 0 - .long SWPMI1_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long MDIOS_WKUP_IRQHandler - .long MDIOS_IRQHandler - .long JPEG_IRQHandler - .long MDMA_IRQHandler - .long 0 - .long SDMMC_IRQHandler - .long HSEM0_IRQHandler - .long 0 - .long DAC2_IRQHandler - .long DMAMUX2_OVR_IRQHandler - .long BDMA_CH1_IRQHandler - .long BDMA_CH2_IRQHandler - .long BDMA_CH3_IRQHandler - .long BDMA_CH4_IRQHandler - .long BDMA_CH5_IRQHandler - .long BDMA_CH6_IRQHandler - .long BDMA_CH7_IRQHandler - .long BDMA_CH8_IRQHandler - .long COMP_IRQHandler - .long LPTIM2_IRQHandler - .long LPTIM3_IRQHandler - .long UART9_IRQHandler - .long USART10_IRQHandler - .long LPUART_IRQHandler - .long WWDG1_RST_IRQHandler - .long CRS_IRQHandler - .long RAMECC_IRQHandler - .long 0 - .long 0 - .long 0 - .long WKUP_IRQHandler - .long OCTOSPI2_IRQHandler - .long OTFDEC1_IRQHandler - .long OTFDEC2_IRQHandler - .long 0 - .long BDMA1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_STAMP_CSS_LSE_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA_STR0_IRQHandler - IRQ DMA1_STR0_IRQHandler - IRQ DMA_STR1_IRQHandler - IRQ DMA1_STR1_IRQHandler - IRQ DMA_STR2_IRQHandler - IRQ DMA1_STR2_IRQHandler - IRQ DMA_STR3_IRQHandler - IRQ DMA1_STR3_IRQHandler - IRQ DMA_STR4_IRQHandler - IRQ DMA1_STR4_IRQHandler - IRQ DMA_STR5_IRQHandler - IRQ DMA1_STR5_IRQHandler - IRQ DMA_STR6_IRQHandler - IRQ DMA1_STR6_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ FDCAN1_IT0_IRQHandler - IRQ FDCAN2_IT0_IRQHandler - IRQ FDCAN1_IT1_IRQHandler - IRQ FDCAN2_IT1_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_IRQHandler - IRQ TIM1_UP_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ TIM8_BRK_TIM12_IRQHandler - IRQ TIM8_UP_TIM13_IRQHandler - IRQ TIM8_TRG_COM_TIM14_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_STR7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_STR0_IRQHandler - IRQ DMA2_STR1_IRQHandler - IRQ DMA2_STR2_IRQHandler - IRQ DMA2_STR3_IRQHandler - IRQ DMA2_STR4_IRQHandler - IRQ DMA2_STR5_IRQHandler - IRQ DMA2_STR6_IRQHandler - IRQ DMA2_STR7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ OTG_HS_EP1_OUT_IRQHandler - IRQ OTG_HS_EP1_IN_IRQHandler - IRQ OTG_HS_WKUP_IRQHandler - IRQ OTG_HS_IRQHandler - IRQ DCMI_PSSI_IRQHandler - IRQ CRYP_IRQHandler - IRQ HASH_RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ UART7_IRQHandler - IRQ UART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LTDC_IRQHandler - IRQ LTDC_ER_IRQHandler - IRQ DMA2D_IRQHandler - IRQ SAI2_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ OCTOSPI1_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ CEC_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ SPDIFRX_IRQHandler - IRQ DMAMUX1_OV_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ SWPMI1_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ MDIOS_WKUP_IRQHandler - IRQ MDIOS_IRQHandler - IRQ JPEG_IRQHandler - IRQ MDMA_IRQHandler - IRQ SDMMC_IRQHandler - IRQ HSEM0_IRQHandler - IRQ DAC2_IRQHandler - IRQ DMAMUX2_OVR_IRQHandler - IRQ BDMA_CH1_IRQHandler - IRQ BDMA_CH2_IRQHandler - IRQ BDMA_CH3_IRQHandler - IRQ BDMA_CH4_IRQHandler - IRQ BDMA_CH5_IRQHandler - IRQ BDMA_CH6_IRQHandler - IRQ BDMA_CH7_IRQHandler - IRQ BDMA_CH8_IRQHandler - IRQ COMP_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ LPTIM3_IRQHandler - IRQ UART9_IRQHandler - IRQ USART10_IRQHandler - IRQ LPUART_IRQHandler - IRQ WWDG1_RST_IRQHandler - IRQ CRS_IRQHandler - IRQ RAMECC_IRQHandler - IRQ WKUP_IRQHandler - IRQ OCTOSPI2_IRQHandler - IRQ OTFDEC1_IRQHandler - IRQ OTFDEC2_IRQHandler - IRQ BDMA1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l0x0.go b/device/stm32/stm32l0x0.go index 9838ee9..44e1178 100644 --- a/device/stm32/stm32l0x0.go +++ b/device/stm32/stm32l0x0.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -88,8 +88,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l0x0.s b/device/stm32/stm32l0x0.s deleted file mode 100644 index 791d99e..0000000 --- a/device/stm32/stm32l0x0.s +++ /dev/null @@ -1,116 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l0x0.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L0x0 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long 0 - .long RTC_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long 0 - .long DMA1_Channel1_IRQHandler - .long DMA1_Channel2_3_IRQHandler - .long DMA1_Channel4_7_IRQHandler - .long ADC_IRQHandler - .long LPTIM1_IRQHandler - .long 0 - .long TIM2_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long TIM21_IRQHandler - .long 0 - .long TIM22_IRQHandler - .long I2C1_IRQHandler - .long 0 - .long SPI1_IRQHandler - .long 0 - .long 0 - .long USART2_IRQHandler - .long LPUART1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ RTC_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ DMA1_Channel1_IRQHandler - IRQ DMA1_Channel2_3_IRQHandler - IRQ DMA1_Channel4_7_IRQHandler - IRQ ADC_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM21_IRQHandler - IRQ TIM22_IRQHandler - IRQ I2C1_IRQHandler - IRQ SPI1_IRQHandler - IRQ USART2_IRQHandler - IRQ LPUART1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l0x1.go b/device/stm32/stm32l0x1.go index 0574ac0..19943d0 100644 --- a/device/stm32/stm32l0x1.go +++ b/device/stm32/stm32l0x1.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -108,8 +108,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l0x1.s b/device/stm32/stm32l0x1.s deleted file mode 100644 index d72f2c6..0000000 --- a/device/stm32/stm32l0x1.s +++ /dev/null @@ -1,125 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l0x1.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L0x1 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long 0 - .long DMA1_Channel1_IRQHandler - .long DMA1_Channel2_3_IRQHandler - .long DMA1_Channel4_7_IRQHandler - .long ADC_COMP_IRQHandler - .long LPTIM1_IRQHandler - .long USART4_USART5_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM6_IRQHandler - .long TIM7_IRQHandler - .long 0 - .long TIM21_IRQHandler - .long I2C3_IRQHandler - .long TIM22_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long AES_RNG_LPUART1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ DMA1_Channel1_IRQHandler - IRQ DMA1_Channel2_3_IRQHandler - IRQ DMA1_Channel4_7_IRQHandler - IRQ ADC_COMP_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ USART4_USART5_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM6_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM21_IRQHandler - IRQ I2C3_IRQHandler - IRQ TIM22_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ AES_RNG_LPUART1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l0x2.go b/device/stm32/stm32l0x2.go index e01d82c..6245ce0 100644 --- a/device/stm32/stm32l0x2.go +++ b/device/stm32/stm32l0x2.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -110,8 +110,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l0x2.s b/device/stm32/stm32l0x2.s deleted file mode 100644 index 8048e2d..0000000 --- a/device/stm32/stm32l0x2.s +++ /dev/null @@ -1,128 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l0x2.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L0x2 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_IRQHandler - .long 0 - .long RCC_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long TSC_IRQHandler - .long DMA1_Channel1_IRQHandler - .long DMA1_Channel2_3_IRQHandler - .long DMA1_Channel4_7_IRQHandler - .long ADC_COMP_IRQHandler - .long LPTIM1_IRQHandler - .long USART4_USART5_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long 0 - .long TIM21_IRQHandler - .long I2C3_IRQHandler - .long TIM22_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long AES_RNG_LPUART1_IRQHandler - .long 0 - .long USB_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ TSC_IRQHandler - IRQ DMA1_Channel1_IRQHandler - IRQ DMA1_Channel2_3_IRQHandler - IRQ DMA1_Channel4_7_IRQHandler - IRQ ADC_COMP_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ USART4_USART5_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM21_IRQHandler - IRQ I2C3_IRQHandler - IRQ TIM22_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ AES_RNG_LPUART1_IRQHandler - IRQ USB_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l0x3.go b/device/stm32/stm32l0x3.go index 5cd592b..e93c2a8 100644 --- a/device/stm32/stm32l0x3.go +++ b/device/stm32/stm32l0x3.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -113,8 +113,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l0x3.s b/device/stm32/stm32l0x3.s deleted file mode 100644 index 7090801..0000000 --- a/device/stm32/stm32l0x3.s +++ /dev/null @@ -1,129 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l0x3.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L0x3 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long RTC_IRQHandler - .long 0 - .long RCC_IRQHandler - .long EXTI0_1_IRQHandler - .long EXTI2_3_IRQHandler - .long EXTI4_15_IRQHandler - .long TSC_IRQHandler - .long DMA1_Channel1_IRQHandler - .long DMA1_Channel2_3_IRQHandler - .long DMA1_Channel4_7_IRQHandler - .long ADC_COMP_IRQHandler - .long LPTIM1_IRQHandler - .long USART4_USART5_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long 0 - .long TIM21_IRQHandler - .long I2C3_IRQHandler - .long TIM22_IRQHandler - .long I2C1_IRQHandler - .long I2C2_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long AES_RNG_LPUART1_IRQHandler - .long LCD_IRQHandler - .long USB_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ RTC_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_1_IRQHandler - IRQ EXTI2_3_IRQHandler - IRQ EXTI4_15_IRQHandler - IRQ TSC_IRQHandler - IRQ DMA1_Channel1_IRQHandler - IRQ DMA1_Channel2_3_IRQHandler - IRQ DMA1_Channel4_7_IRQHandler - IRQ ADC_COMP_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ USART4_USART5_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM21_IRQHandler - IRQ I2C3_IRQHandler - IRQ TIM22_IRQHandler - IRQ I2C1_IRQHandler - IRQ I2C2_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ AES_RNG_LPUART1_IRQHandler - IRQ LCD_IRQHandler - IRQ USB_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l100.go b/device/stm32/stm32l100.go index fd4c8ec..428238c 100644 --- a/device/stm32/stm32l100.go +++ b/device/stm32/stm32l100.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -181,8 +181,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l100.s b/device/stm32/stm32l100.s deleted file mode 100644 index 7fb2517..0000000 --- a/device/stm32/stm32l100.s +++ /dev/null @@ -1,181 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l100.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L100 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMPER_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Channel1_IRQHandler - .long DMA1_Channel2_IRQHandler - .long DMA1_Channel3_IRQHandler - .long DMA1_Channel4_IRQHandler - .long DMA1_Channel5_IRQHandler - .long DMA1_Channel6_IRQHandler - .long DMA1_Channel7_IRQHandler - .long ADC1_IRQHandler - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long DAC_IRQHandler - .long COMP_CA_IRQHandler - .long EXTI9_5_IRQHandler - .long LCD_IRQHandler - .long TIM9_IRQHandler - .long TIM10_IRQHandler - .long TIM11_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long USB_FS_WKUP_IRQHandler - .long TIM6_IRQHandler - .long TIM7_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long USART4_IRQHandler - .long USART5_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long AES_IRQHandler - .long COMP_ACQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMPER_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Channel1_IRQHandler - IRQ DMA1_Channel2_IRQHandler - IRQ DMA1_Channel3_IRQHandler - IRQ DMA1_Channel4_IRQHandler - IRQ DMA1_Channel5_IRQHandler - IRQ DMA1_Channel6_IRQHandler - IRQ DMA1_Channel7_IRQHandler - IRQ ADC1_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ DAC_IRQHandler - IRQ COMP_CA_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ LCD_IRQHandler - IRQ TIM9_IRQHandler - IRQ TIM10_IRQHandler - IRQ TIM11_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ USB_FS_WKUP_IRQHandler - IRQ TIM6_IRQHandler - IRQ TIM7_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ USART4_IRQHandler - IRQ USART5_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ AES_IRQHandler - IRQ COMP_ACQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l151.go b/device/stm32/stm32l151.go index 0614b69..deaa5d6 100644 --- a/device/stm32/stm32l151.go +++ b/device/stm32/stm32l151.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -185,8 +185,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l151.s b/device/stm32/stm32l151.s deleted file mode 100644 index 3debb35..0000000 --- a/device/stm32/stm32l151.s +++ /dev/null @@ -1,181 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l151.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L151 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMPER_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Channel1_IRQHandler - .long DMA1_Channel2_IRQHandler - .long DMA1_Channel3_IRQHandler - .long DMA1_Channel4_IRQHandler - .long DMA1_Channel5_IRQHandler - .long DMA1_Channel6_IRQHandler - .long DMA1_Channel7_IRQHandler - .long ADC1_IRQHandler - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long DAC_IRQHandler - .long COMP_CA_IRQHandler - .long EXTI9_5_IRQHandler - .long LCD_IRQHandler - .long TIM9_IRQHandler - .long TIM10_IRQHandler - .long TIM11_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long USB_FS_WKUP_IRQHandler - .long TIM6_IRQHandler - .long TIM7_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long AES_IRQHandler - .long COMP_ACQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMPER_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Channel1_IRQHandler - IRQ DMA1_Channel2_IRQHandler - IRQ DMA1_Channel3_IRQHandler - IRQ DMA1_Channel4_IRQHandler - IRQ DMA1_Channel5_IRQHandler - IRQ DMA1_Channel6_IRQHandler - IRQ DMA1_Channel7_IRQHandler - IRQ ADC1_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ DAC_IRQHandler - IRQ COMP_CA_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ LCD_IRQHandler - IRQ TIM9_IRQHandler - IRQ TIM10_IRQHandler - IRQ TIM11_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ USB_FS_WKUP_IRQHandler - IRQ TIM6_IRQHandler - IRQ TIM7_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ AES_IRQHandler - IRQ COMP_ACQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l162.go b/device/stm32/stm32l162.go index 0c97ed9..2a06391 100644 --- a/device/stm32/stm32l162.go +++ b/device/stm32/stm32l162.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -184,8 +184,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l162.s b/device/stm32/stm32l162.s deleted file mode 100644 index be455ec..0000000 --- a/device/stm32/stm32l162.s +++ /dev/null @@ -1,181 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l162.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L162 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMPER_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_Channel1_IRQHandler - .long DMA1_Channel2_IRQHandler - .long DMA1_Channel3_IRQHandler - .long DMA1_Channel4_IRQHandler - .long DMA1_Channel5_IRQHandler - .long DMA1_Channel6_IRQHandler - .long DMA1_Channel7_IRQHandler - .long ADC1_IRQHandler - .long USB_HP_IRQHandler - .long USB_LP_IRQHandler - .long DAC_IRQHandler - .long COMP_CA_IRQHandler - .long EXTI9_5_IRQHandler - .long LCD_IRQHandler - .long TIM9_IRQHandler - .long TIM10_IRQHandler - .long TIM11_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_Alarm_IRQHandler - .long USB_FS_WKUP_IRQHandler - .long TIM6_IRQHandler - .long TIM7_IRQHandler - .long SDIO_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long AES_IRQHandler - .long COMP_ACQ_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMPER_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_Channel1_IRQHandler - IRQ DMA1_Channel2_IRQHandler - IRQ DMA1_Channel3_IRQHandler - IRQ DMA1_Channel4_IRQHandler - IRQ DMA1_Channel5_IRQHandler - IRQ DMA1_Channel6_IRQHandler - IRQ DMA1_Channel7_IRQHandler - IRQ ADC1_IRQHandler - IRQ USB_HP_IRQHandler - IRQ USB_LP_IRQHandler - IRQ DAC_IRQHandler - IRQ COMP_CA_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ LCD_IRQHandler - IRQ TIM9_IRQHandler - IRQ TIM10_IRQHandler - IRQ TIM11_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_Alarm_IRQHandler - IRQ USB_FS_WKUP_IRQHandler - IRQ TIM6_IRQHandler - IRQ TIM7_IRQHandler - IRQ SDIO_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ AES_IRQHandler - IRQ COMP_ACQ_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l4r9.go b/device/stm32/stm32l4r9.go index 7135ad7..41201f7 100644 --- a/device/stm32/stm32l4r9.go +++ b/device/stm32/stm32l4r9.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -279,8 +279,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l4r9.s b/device/stm32/stm32l4r9.s deleted file mode 100644 index cece473..0000000 --- a/device/stm32/stm32l4r9.s +++ /dev/null @@ -1,253 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l4r9.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L4R9 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_TIM17_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long COMP_IRQHandler - .long LPTIM1_IRQHandler - .long LPTIM2_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_CH6_IRQHandler - .long DMA2_CH7_IRQHandler - .long LPUART1_IRQHandler - .long OCTOSPI1_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long SAI1_IRQHandler - .long SAI2_IRQHandler - .long OCTOSPI2_IRQHandler - .long TSC_IRQHandler - .long DSIHOST_IRQHandler - .long AES_IRQHandler - .long RNG_HASH_IRQHandler - .long FPU_IRQHandler - .long CRS_IRQHandler - .long I2C4_ER_IRQHandler - .long I2C4_EV_IRQHandler - .long DCMI_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long DMA2D_IRQHandler - .long LCD_TFT_IRQHandler - .long LCD_TFT_ER_IRQHandler - .long GFXMMU_IRQHandler - .long DMAMUX_OVR_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_TIM17_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ COMP_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ DMA2_CH7_IRQHandler - IRQ LPUART1_IRQHandler - IRQ OCTOSPI1_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ SAI1_IRQHandler - IRQ SAI2_IRQHandler - IRQ OCTOSPI2_IRQHandler - IRQ TSC_IRQHandler - IRQ DSIHOST_IRQHandler - IRQ AES_IRQHandler - IRQ RNG_HASH_IRQHandler - IRQ FPU_IRQHandler - IRQ CRS_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ DCMI_IRQHandler - IRQ DMA2D_IRQHandler - IRQ LCD_TFT_IRQHandler - IRQ LCD_TFT_ER_IRQHandler - IRQ GFXMMU_IRQHandler - IRQ DMAMUX_OVR_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l4x1.go b/device/stm32/stm32l4x1.go index bffdcd6..f4a453b 100644 --- a/device/stm32/stm32l4x1.go +++ b/device/stm32/stm32l4x1.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -237,8 +237,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l4x1.s b/device/stm32/stm32l4x1.s deleted file mode 100644 index 6d2b44a..0000000 --- a/device/stm32/stm32l4x1.s +++ /dev/null @@ -1,227 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l4x1.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L4x1 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_2_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long 0 - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long SDMMC1_IRQHandler - .long 0 - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long 0 - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long DFSDM1_IRQHandler - .long DFSDM2_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long COMP_IRQHandler - .long LPTIM1_IRQHandler - .long LPTIM2_IRQHandler - .long USB_FS_IRQHandler - .long DMA2_CH6_IRQHandler - .long DMA2_CH7_IRQHandler - .long LPUART1_IRQHandler - .long QUADSPI_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long SAI1_IRQHandler - .long 0 - .long SWPMI1_IRQHandler - .long TSC_IRQHandler - .long LCD_IRQHandler - .long AES_IRQHandler - .long RNG_IRQHandler - .long FPU_IRQHandler - .long CRS_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ DFSDM1_IRQHandler - IRQ DFSDM2_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ COMP_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ USB_FS_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ DMA2_CH7_IRQHandler - IRQ LPUART1_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ SAI1_IRQHandler - IRQ SWPMI1_IRQHandler - IRQ TSC_IRQHandler - IRQ LCD_IRQHandler - IRQ AES_IRQHandler - IRQ RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ CRS_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l4x2.go b/device/stm32/stm32l4x2.go index f1c938e..6a8fb98 100644 --- a/device/stm32/stm32l4x2.go +++ b/device/stm32/stm32l4x2.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -238,8 +238,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l4x2.s b/device/stm32/stm32l4x2.s deleted file mode 100644 index 474cfcd..0000000 --- a/device/stm32/stm32l4x2.s +++ /dev/null @@ -1,227 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l4x2.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L4x2 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_2_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long 0 - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long SDMMC1_IRQHandler - .long 0 - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long 0 - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long DFSDM1_IRQHandler - .long DFSDM2_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long COMP_IRQHandler - .long LPTIM1_IRQHandler - .long LPTIM2_IRQHandler - .long USB_FS_IRQHandler - .long DMA2_CH6_IRQHandler - .long DMA2_CH7_IRQHandler - .long LPUART1_IRQHandler - .long QUADSPI_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long SAI1_IRQHandler - .long 0 - .long SWPMI1_IRQHandler - .long TSC_IRQHandler - .long LCD_IRQHandler - .long AES_IRQHandler - .long RNG_IRQHandler - .long FPU_IRQHandler - .long CRS_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ DFSDM1_IRQHandler - IRQ DFSDM2_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ COMP_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ USB_FS_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ DMA2_CH7_IRQHandler - IRQ LPUART1_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ SAI1_IRQHandler - IRQ SWPMI1_IRQHandler - IRQ TSC_IRQHandler - IRQ LCD_IRQHandler - IRQ AES_IRQHandler - IRQ RNG_IRQHandler - IRQ FPU_IRQHandler - IRQ CRS_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l4x3.go b/device/stm32/stm32l4x3.go index dca5ecc..44d6456 100644 --- a/device/stm32/stm32l4x3.go +++ b/device/stm32/stm32l4x3.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -203,8 +203,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l4x3.s b/device/stm32/stm32l4x3.s deleted file mode 100644 index ff318e0..0000000 --- a/device/stm32/stm32l4x3.s +++ /dev/null @@ -1,212 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l4x3.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L4x3 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_2_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long 0 - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long 0 - .long 0 - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long SDMMC_IRQHandler - .long 0 - .long SPI3_IRQHandler - .long 0 - .long 0 - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long 0 - .long 0 - .long 0 - .long COMP_IRQHandler - .long LPTIM1_IRQHandler - .long LPTIM2_IRQHandler - .long USB_FS_IRQHandler - .long DMA2_CH6_IRQHandler - .long DMA2_CH7_IRQHandler - .long 0 - .long 0 - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long SAI1_IRQHandler - .long 0 - .long SWPMI1_IRQHandler - .long TSC_IRQHandler - .long LCD_IRQHandler - .long RNG_IRQHandler - .long CRS_IRQHandler - .long FPU_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ SDMMC_IRQHandler - IRQ SPI3_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ COMP_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ USB_FS_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ DMA2_CH7_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ SAI1_IRQHandler - IRQ SWPMI1_IRQHandler - IRQ TSC_IRQHandler - IRQ LCD_IRQHandler - IRQ RNG_IRQHandler - IRQ CRS_IRQHandler - IRQ FPU_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l4x5.go b/device/stm32/stm32l4x5.go index 9b9a3db..6aa9f16 100644 --- a/device/stm32/stm32l4x5.go +++ b/device/stm32/stm32l4x5.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -231,8 +231,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l4x5.s b/device/stm32/stm32l4x5.s deleted file mode 100644 index 56dca1c..0000000 --- a/device/stm32/stm32l4x5.s +++ /dev/null @@ -1,224 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l4x5.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L4x5 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long 0 - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_2_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long EXTI9_5_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM1_TRG_COM_TIM17_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long DFSDM3_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long FMC_IRQHandler - .long SDMMC_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DAC_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long DFSDM0_IRQHandler - .long DFSDM1_IRQHandler - .long DFSDM2_IRQHandler - .long COMP_IRQHandler - .long LPTIM1_IRQHandler - .long LPTIM2_IRQHandler - .long 0 - .long DMA2_CH6_IRQHandler - .long DMA2_CH7_IRQHandler - .long 0 - .long QUADSPI_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long SAI1_IRQHandler - .long SAI2_IRQHandler - .long SWPMI1_IRQHandler - .long TSC_IRQHandler - .long LCD_IRQHandler - .long AES_IRQHandler - .long RNG_IRQHandler - .long FPU_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM1_TRG_COM_TIM17_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ DFSDM3_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DAC_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ DFSDM0_IRQHandler - IRQ DFSDM1_IRQHandler - IRQ DFSDM2_IRQHandler - IRQ COMP_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ DMA2_CH7_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ SAI1_IRQHandler - IRQ SAI2_IRQHandler - IRQ SWPMI1_IRQHandler - IRQ TSC_IRQHandler - IRQ LCD_IRQHandler - IRQ AES_IRQHandler - IRQ RNG_IRQHandler - IRQ FPU_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l4x6.go b/device/stm32/stm32l4x6.go index 708528e..aae3dc0 100644 --- a/device/stm32/stm32l4x6.go +++ b/device/stm32/stm32l4x6.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -276,8 +276,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l4x6.s b/device/stm32/stm32l4x6.s deleted file mode 100644 index 87199e3..0000000 --- a/device/stm32/stm32l4x6.s +++ /dev/null @@ -1,249 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l4x6.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L4x6 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long TAMP_STAMP_IRQHandler - .long RTC_WKUP_IRQHandler - .long FLASH_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long ADC1_2_IRQHandler - .long CAN1_TX_IRQHandler - .long CAN1_RX0_IRQHandler - .long CAN1_RX1_IRQHandler - .long CAN1_SCE_IRQHandler - .long EXTI9_5_IRQHandler - .long TIM1_BRK_TIM15_IRQHandler - .long TIM1_UP_TIM16_IRQHandler - .long TIM1_TRG_COM_TIM17_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI15_10_IRQHandler - .long RTC_ALARM_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long ADC3_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long TIM6_DACUNDER_IRQHandler - .long TIM7_IRQHandler - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long COMP_IRQHandler - .long LPTIM1_IRQHandler - .long LPTIM2_IRQHandler - .long OTG_FS_IRQHandler - .long DMA2_CH6_IRQHandler - .long DMA2_CH7_IRQHandler - .long LPUART1_IRQHandler - .long QUADSPI_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long SAI1_IRQHandler - .long SAI2_IRQHandler - .long SWPMI1_IRQHandler - .long TSC_IRQHandler - .long LCD_IRQHandler - .long AES_IRQHandler - .long RNG_HASH_IRQHandler - .long FPU_IRQHandler - .long CRS_IRQHandler - .long I2C4_EV_IRQHandler - .long I2C4_ER_IRQHandler - .long DCMI_IRQHandler - .long CAN2_TX_IRQHandler - .long CAN2_RX0_IRQHandler - .long CAN2_RX1_IRQHandler - .long CAN2_SCE_IRQHandler - .long DMA2D_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ TAMP_STAMP_IRQHandler - IRQ RTC_WKUP_IRQHandler - IRQ FLASH_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ CAN1_TX_IRQHandler - IRQ CAN1_RX0_IRQHandler - IRQ CAN1_RX1_IRQHandler - IRQ CAN1_SCE_IRQHandler - IRQ EXTI9_5_IRQHandler - IRQ TIM1_BRK_TIM15_IRQHandler - IRQ TIM1_UP_TIM16_IRQHandler - IRQ TIM1_TRG_COM_TIM17_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI15_10_IRQHandler - IRQ RTC_ALARM_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ ADC3_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ TIM6_DACUNDER_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ COMP_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ OTG_FS_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ DMA2_CH7_IRQHandler - IRQ LPUART1_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ SAI1_IRQHandler - IRQ SAI2_IRQHandler - IRQ SWPMI1_IRQHandler - IRQ TSC_IRQHandler - IRQ LCD_IRQHandler - IRQ AES_IRQHandler - IRQ RNG_HASH_IRQHandler - IRQ FPU_IRQHandler - IRQ CRS_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ DCMI_IRQHandler - IRQ CAN2_TX_IRQHandler - IRQ CAN2_RX0_IRQHandler - IRQ CAN2_RX1_IRQHandler - IRQ CAN2_SCE_IRQHandler - IRQ DMA2D_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l552.go b/device/stm32/stm32l552.go index 548faf1..e75fc46 100644 --- a/device/stm32/stm32l552.go +++ b/device/stm32/stm32l552.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -305,8 +305,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l552.s b/device/stm32/stm32l552.s deleted file mode 100644 index e5b2f0d..0000000 --- a/device/stm32/stm32l552.s +++ /dev/null @@ -1,274 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l552.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L552 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_IRQHandler - .long RTC_S_IRQHandler - .long TAMP_IRQHandler - .long TAMP_S_IRQHandler - .long FLASH_IRQHandler - .long FLASH_S_IRQHandler - .long 0 - .long RCC_IRQHandler - .long RCC_S_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long EXTI5_IRQHandler - .long EXTI6_IRQHandler - .long EXTI7_IRQHandler - .long EXTI8_IRQHandler - .long EXTI9_IRQHandler - .long EXTI10_IRQHandler - .long EXTI11_IRQHandler - .long EXTI12_IRQHandler - .long EXTI13_IRQHandler - .long EXTI14_IRQHandler - .long EXTI15_IRQHandler - .long DMAMUX1_OVR_IRQHandler - .long DMAMUX1_OVR_S_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long DMA1_Channel8_IRQHandler - .long ADC1_2_IRQHandler - .long 0 - .long FDCAN1_IT0_IRQHandler - .long FDCAN1_IT1_IRQHandler - .long TIM1_BRK_IRQHandler - .long TIM1_UP_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long TIM5_IRQHandler - .long TIM6_IRQHandler - .long TIM7_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long LPUART1_IRQHandler - .long LPTIM1_IRQHandler - .long LPTIM2_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long COMP_IRQHandler - .long USB_FS_IRQHandler - .long 0 - .long FMC_IRQHandler - .long OCTOSPI1_IRQHandler - .long 0 - .long SDMMC1_IRQHandler - .long 0 - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long DMA2_CH6_IRQHandler - .long DMA2_CH7_IRQHandler - .long DMA2_CH8_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long SAI1_IRQHandler - .long SAI2_IRQHandler - .long TSC_IRQHandler - .long 0 - .long RNG_IRQHandler - .long 0 - .long 0 - .long 0 - .long LPTIM3_IRQHandler - .long SPI3_IRQHandler - .long I2C4_ER_IRQHandler - .long I2C4_EV_IRQHandler - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long UCPD1_IRQHandler - .long ICACHE_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_IRQHandler - IRQ RTC_S_IRQHandler - IRQ TAMP_IRQHandler - IRQ TAMP_S_IRQHandler - IRQ FLASH_IRQHandler - IRQ FLASH_S_IRQHandler - IRQ RCC_IRQHandler - IRQ RCC_S_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ EXTI5_IRQHandler - IRQ EXTI6_IRQHandler - IRQ EXTI7_IRQHandler - IRQ EXTI8_IRQHandler - IRQ EXTI9_IRQHandler - IRQ EXTI10_IRQHandler - IRQ EXTI11_IRQHandler - IRQ EXTI12_IRQHandler - IRQ EXTI13_IRQHandler - IRQ EXTI14_IRQHandler - IRQ EXTI15_IRQHandler - IRQ DMAMUX1_OVR_IRQHandler - IRQ DMAMUX1_OVR_S_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ DMA1_Channel8_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ FDCAN1_IT0_IRQHandler - IRQ FDCAN1_IT1_IRQHandler - IRQ TIM1_BRK_IRQHandler - IRQ TIM1_UP_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ TIM5_IRQHandler - IRQ TIM6_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ LPUART1_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ COMP_IRQHandler - IRQ USB_FS_IRQHandler - IRQ FMC_IRQHandler - IRQ OCTOSPI1_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ DMA2_CH7_IRQHandler - IRQ DMA2_CH8_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ SAI1_IRQHandler - IRQ SAI2_IRQHandler - IRQ TSC_IRQHandler - IRQ RNG_IRQHandler - IRQ LPTIM3_IRQHandler - IRQ SPI3_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ UCPD1_IRQHandler - IRQ ICACHE_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32l562.go b/device/stm32/stm32l562.go index a410738..b149ee7 100644 --- a/device/stm32/stm32l562.go +++ b/device/stm32/stm32l562.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -314,8 +314,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG_IRQHandler func interruptWWDG() { diff --git a/device/stm32/stm32l562.s b/device/stm32/stm32l562.s deleted file mode 100644 index d768777..0000000 --- a/device/stm32/stm32l562.s +++ /dev/null @@ -1,278 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32l562.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32L562 -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG_IRQHandler - .long PVD_PVM_IRQHandler - .long RTC_IRQHandler - .long RTC_S_IRQHandler - .long TAMP_IRQHandler - .long TAMP_S_IRQHandler - .long FLASH_IRQHandler - .long FLASH_S_IRQHandler - .long 0 - .long RCC_IRQHandler - .long RCC_S_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long EXTI5_IRQHandler - .long EXTI6_IRQHandler - .long EXTI7_IRQHandler - .long EXTI8_IRQHandler - .long EXTI9_IRQHandler - .long EXTI10_IRQHandler - .long EXTI11_IRQHandler - .long EXTI12_IRQHandler - .long EXTI13_IRQHandler - .long EXTI14_IRQHandler - .long EXTI15_IRQHandler - .long DMAMUX1_OVR_IRQHandler - .long DMAMUX1_OVR_S_IRQHandler - .long DMA1_CH1_IRQHandler - .long DMA1_CH2_IRQHandler - .long DMA1_CH3_IRQHandler - .long DMA1_CH4_IRQHandler - .long DMA1_CH5_IRQHandler - .long DMA1_CH6_IRQHandler - .long DMA1_CH7_IRQHandler - .long DMA1_Channel8_IRQHandler - .long ADC1_2_IRQHandler - .long 0 - .long FDCAN1_IT0_IRQHandler - .long FDCAN1_IT1_IRQHandler - .long TIM1_BRK_IRQHandler - .long TIM1_UP_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long TIM5_IRQHandler - .long TIM6_IRQHandler - .long TIM7_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long I2C1_EV_IRQHandler - .long I2C1_ER_IRQHandler - .long I2C2_EV_IRQHandler - .long I2C2_ER_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long UART4_IRQHandler - .long UART5_IRQHandler - .long LPUART1_IRQHandler - .long LPTIM1_IRQHandler - .long LPTIM2_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long COMP_IRQHandler - .long USB_FS_IRQHandler - .long 0 - .long FMC_IRQHandler - .long OCTOSPI1_IRQHandler - .long 0 - .long SDMMC1_IRQHandler - .long 0 - .long DMA2_CH1_IRQHandler - .long DMA2_CH2_IRQHandler - .long DMA2_CH3_IRQHandler - .long DMA2_CH4_IRQHandler - .long DMA2_CH5_IRQHandler - .long DMA2_CH6_IRQHandler - .long DMA2_CH7_IRQHandler - .long DMA2_CH8_IRQHandler - .long I2C3_EV_IRQHandler - .long I2C3_ER_IRQHandler - .long SAI1_IRQHandler - .long SAI2_IRQHandler - .long TSC_IRQHandler - .long AES_IRQHandler - .long RNG_IRQHandler - .long 0 - .long 0 - .long PKA_IRQHandler - .long LPTIM3_IRQHandler - .long SPI3_IRQHandler - .long I2C4_ER_IRQHandler - .long I2C4_EV_IRQHandler - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long UCPD1_IRQHandler - .long ICACHE_IRQHandler - .long OTFDEC1_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG_IRQHandler - IRQ PVD_PVM_IRQHandler - IRQ RTC_IRQHandler - IRQ RTC_S_IRQHandler - IRQ TAMP_IRQHandler - IRQ TAMP_S_IRQHandler - IRQ FLASH_IRQHandler - IRQ FLASH_S_IRQHandler - IRQ RCC_IRQHandler - IRQ RCC_S_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ EXTI5_IRQHandler - IRQ EXTI6_IRQHandler - IRQ EXTI7_IRQHandler - IRQ EXTI8_IRQHandler - IRQ EXTI9_IRQHandler - IRQ EXTI10_IRQHandler - IRQ EXTI11_IRQHandler - IRQ EXTI12_IRQHandler - IRQ EXTI13_IRQHandler - IRQ EXTI14_IRQHandler - IRQ EXTI15_IRQHandler - IRQ DMAMUX1_OVR_IRQHandler - IRQ DMAMUX1_OVR_S_IRQHandler - IRQ DMA1_CH1_IRQHandler - IRQ DMA1_CH2_IRQHandler - IRQ DMA1_CH3_IRQHandler - IRQ DMA1_CH4_IRQHandler - IRQ DMA1_CH5_IRQHandler - IRQ DMA1_CH6_IRQHandler - IRQ DMA1_CH7_IRQHandler - IRQ DMA1_Channel8_IRQHandler - IRQ ADC1_2_IRQHandler - IRQ FDCAN1_IT0_IRQHandler - IRQ FDCAN1_IT1_IRQHandler - IRQ TIM1_BRK_IRQHandler - IRQ TIM1_UP_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ TIM5_IRQHandler - IRQ TIM6_IRQHandler - IRQ TIM7_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ I2C1_EV_IRQHandler - IRQ I2C1_ER_IRQHandler - IRQ I2C2_EV_IRQHandler - IRQ I2C2_ER_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ UART4_IRQHandler - IRQ UART5_IRQHandler - IRQ LPUART1_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ COMP_IRQHandler - IRQ USB_FS_IRQHandler - IRQ FMC_IRQHandler - IRQ OCTOSPI1_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ DMA2_CH1_IRQHandler - IRQ DMA2_CH2_IRQHandler - IRQ DMA2_CH3_IRQHandler - IRQ DMA2_CH4_IRQHandler - IRQ DMA2_CH5_IRQHandler - IRQ DMA2_CH6_IRQHandler - IRQ DMA2_CH7_IRQHandler - IRQ DMA2_CH8_IRQHandler - IRQ I2C3_EV_IRQHandler - IRQ I2C3_ER_IRQHandler - IRQ SAI1_IRQHandler - IRQ SAI2_IRQHandler - IRQ TSC_IRQHandler - IRQ AES_IRQHandler - IRQ RNG_IRQHandler - IRQ PKA_IRQHandler - IRQ LPTIM3_IRQHandler - IRQ SPI3_IRQHandler - IRQ I2C4_ER_IRQHandler - IRQ I2C4_EV_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ UCPD1_IRQHandler - IRQ ICACHE_IRQHandler - IRQ OTFDEC1_IRQHandler - -.size __isr_vector, .-__isr_vector diff --git a/device/stm32/stm32mp153.go b/device/stm32/stm32mp153.go index 60725c0..0da3554 100644 --- a/device/stm32/stm32mp153.go +++ b/device/stm32/stm32mp153.go @@ -10,7 +10,7 @@ package stm32 import ( - "runtime/volatile" + "github.com/goplus/emb/runtime/volatile" "unsafe" ) @@ -415,8 +415,11 @@ const ( // Pseudo function call that is replaced by the compiler with the actual // functions registered through interrupt.New. // -//go:linkname callHandlers runtime/interrupt.callHandlers -func callHandlers(num int) +// NOTE(zzy): runtime/interrupt.callHandlers is not yet implemented in LLGO +// Original linkname: //go:linkname callHandlers runtime/interrupt.callHandlers +func callHandlers(num int) { + // TODO: implement interrupt handler dispatch mechanism +} //export WWDG1_IT_IRQHandler func interruptWWDG1_IT() { diff --git a/device/stm32/stm32mp153.s b/device/stm32/stm32mp153.s deleted file mode 100644 index 69c68e3..0000000 --- a/device/stm32/stm32mp153.s +++ /dev/null @@ -1,424 +0,0 @@ -// Automatically generated file. DO NOT EDIT. -// Generated by gen-device-svd.go from stm32mp153.svd, see https://github.com/tinygo-org/stm32-svd - -/* -// STM32MP153x -*/ - - - -.syntax unified - -// This is the default handler for interrupts, if triggered but not defined. -.section .text.Default_Handler -.global Default_Handler -.type Default_Handler, %function -Default_Handler: - wfe - b Default_Handler -.size Default_Handler, .-Default_Handler - -// Avoid the need for repeated .weak and .set instructions. -.macro IRQ handler - .weak \handler - .set \handler, Default_Handler -.endm - -// Must set the "a" flag on the section: -// https://svnweb.freebsd.org/base/stable/11/sys/arm/arm/locore-v4.S?r1=321049&r2=321048&pathrev=321049 -// https://sourceware.org/binutils/docs/as/Section.html#ELF-Version -.section .isr_vector, "a", %progbits -.global __isr_vector -__isr_vector: - // Interrupt vector as defined by Cortex-M, starting with the stack top. - // On reset, SP is initialized with *0x0 and PC is loaded with *0x4, loading - // _stack_top and Reset_Handler. - .long _stack_top - .long Reset_Handler - .long NMI_Handler - .long HardFault_Handler - .long MemoryManagement_Handler - .long BusFault_Handler - .long UsageFault_Handler - .long 0 - .long 0 - .long 0 - .long 0 - .long SVC_Handler - .long DebugMon_Handler - .long 0 - .long PendSV_Handler - .long SysTick_Handler - - // Extra interrupts for peripherals defined by the hardware vendor. - .long WWDG1_IT_IRQHandler - .long PVD_AVD_IRQHandler - .long TAMP_IRQHandler - .long RTC_WKUP_ALARM_IRQHandler - .long TZC_IT_IRQHandler - .long RCC_IRQHandler - .long EXTI0_IRQHandler - .long EXTI1_IRQHandler - .long EXTI2_IRQHandler - .long EXTI3_IRQHandler - .long EXTI4_IRQHandler - .long DMA1_STR0_IRQHandler - .long DMA1_STR1_IRQHandler - .long DMA1_STR2_IRQHandler - .long DMA1_STR3_IRQHandler - .long DMA1_STR4_IRQHandler - .long DMA1_STR5_IRQHandler - .long DMA1_STR6_IRQHandler - .long ADC1_IRQHandler - .long FDCAN1_IT0_IRQHandler - .long FDCAN2_IT0_IRQHandler - .long FDCAN1_IT1_IRQHandler - .long FDCAN2_IT1_IRQHandler - .long EXTI5_IRQHandler - .long TIM1_BRK_IRQHandler - .long TIM1_UP_IRQHandler - .long TIM1_TRG_COM_IRQHandler - .long TIM1_CC_IRQHandler - .long TIM2_IRQHandler - .long TIM3_IRQHandler - .long TIM4_IRQHandler - .long I2C1_EVT_IRQHandler - .long I2C1_ERR_IRQHandler - .long I2C2_EVT_IRQHandler - .long I2C2_ERR_IRQHandler - .long SPI1_IRQHandler - .long SPI2_IRQHandler - .long USART1_IRQHandler - .long USART2_IRQHandler - .long USART3_IRQHandler - .long EXTI10_IRQHandler - .long RTC_TS_IRQHandler - .long EXTI11_IRQHandler - .long TIM8_BRK_IRQHandler - .long TIM8_UP_IRQHandler - .long TIM8_TRG_COM_IRQHandler - .long TIM8_CC_IRQHandler - .long DMA1_STR7_IRQHandler - .long FMC_IRQHandler - .long SDMMC1_IRQHandler - .long TIM5_IRQHandler - .long SPI3_IRQHandler - .long USART4_IRQHandler - .long USART5_IRQHandler - .long TIM6_IRQHandler - .long TIM7_IRQHandler - .long DMA2_STR0_IRQHandler - .long DMA2_STR1_IRQHandler - .long DMA2_STR2_IRQHandler - .long DMA2_STR3_IRQHandler - .long DMA2_STR4_IRQHandler - .long ETH1_IRQHandler - .long ETH1_WKUP_IRQHandler - .long 0 - .long EXTI6_IRQHandler - .long EXTI7_IRQHandler - .long EXTI8_IRQHandler - .long EXTI9_IRQHandler - .long DMA2_STR5_IRQHandler - .long DMA2_STR6_IRQHandler - .long DMA2_STR7_IRQHandler - .long USART6_IRQHandler - .long I2C3_EVT_IRQHandler - .long I2C3_ERR_IRQHandler - .long 0 - .long 0 - .long EXTI12_IRQHandler - .long EXTI13_IRQHandler - .long DCMI_IRQHandler - .long CRYP1_IRQHandler - .long HASH1_IRQHandler - .long 0 - .long USART7_IRQHandler - .long USART8_IRQHandler - .long SPI4_IRQHandler - .long SPI5_IRQHandler - .long SPI6_IRQHandler - .long SAI1_IRQHandler - .long LTDC_IRQHandler - .long LTDC_ER_IRQHandler - .long ADC2_IRQHandler - .long SAI2_IRQHandler - .long QUADSPI_IRQHandler - .long LPTIM1_IRQHandler - .long CEC_IRQHandler - .long I2C4_EVT_IRQHandler - .long I2C4_ERR_IRQHandler - .long SPDIFRX_IRQHandler - .long OTG_IRQHandler - .long 0 - .long IPCC_RX0_IRQHandler - .long IPCC_TX0_IRQHandler - .long DMAMUX1_OVR_REQ_IRQHandler - .long IPCC_RX1_IRQHandler - .long IPCC_TX1_IRQHandler - .long CRYP2_IRQHandler - .long HASH2_IRQHandler - .long I2C5_EVT_IRQHandler - .long I2C5_ERR_IRQHandler - .long 0 - .long DFSDM1_FLT0_IRQHandler - .long DFSDM1_FLT1_IRQHandler - .long DFSDM1_FLT2_IRQHandler - .long DFSDM1_FLT3_IRQHandler - .long SAI3_IRQHandler - .long DFSDM1_FLT4_IRQHandler - .long TIM15_IRQHandler - .long TIM16_IRQHandler - .long TIM17_IRQHandler - .long TIM12_IRQHandler - .long MDIOS_IRQHandler - .long EXTI14_IRQHandler - .long MDMA_IRQHandler - .long 0 - .long SDMMC2_IRQHandler - .long HSEM_IT2_IRQHandler - .long DFSDM1_FLT5_IRQHandler - .long EXTI15_IRQHandler - .long 0 - .long 0 - .long TIM13_IRQHandler - .long TIM14_IRQHandler - .long DAC_IRQHandler - .long RNG1_IRQHandler - .long RNG2_IRQHandler - .long I2C6_EVT_IRQHandler - .long I2C6_ERR_IRQHandler - .long SDMMC3_IRQHandler - .long LPTIM2_IRQHandler - .long LPTIM3_IRQHandler - .long LPTIM4_IRQHandler - .long LPTIM5_IRQHandler - .long ETH1_LPI_IRQHandler - .long 0 - .long 0 - .long RCC_WAKEUP_IRQHandler - .long SAI4_IRQHandler - .long DTS_IRQHandler - .long 0 - .long 0 - .long IWDG1_IT_IRQHandler - .long IWDG2_IT_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long TAMP_S_IRQHandler - .long RTC_WKUP_ALARM_S_IRQHandler - .long RTC_TS_S_IRQHandler - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long DDRPERFM_IRQHandler - - // Define default implementations for interrupts, redirecting to - // Default_Handler when not implemented. - IRQ NMI_Handler - IRQ HardFault_Handler - IRQ MemoryManagement_Handler - IRQ BusFault_Handler - IRQ UsageFault_Handler - IRQ SVC_Handler - IRQ DebugMon_Handler - IRQ PendSV_Handler - IRQ SysTick_Handler - IRQ WWDG1_IT_IRQHandler - IRQ PVD_AVD_IRQHandler - IRQ TAMP_IRQHandler - IRQ RTC_WKUP_ALARM_IRQHandler - IRQ TZC_IT_IRQHandler - IRQ RCC_IRQHandler - IRQ EXTI0_IRQHandler - IRQ EXTI1_IRQHandler - IRQ EXTI2_IRQHandler - IRQ EXTI3_IRQHandler - IRQ EXTI4_IRQHandler - IRQ DMA1_STR0_IRQHandler - IRQ DMA1_STR1_IRQHandler - IRQ DMA1_STR2_IRQHandler - IRQ DMA1_STR3_IRQHandler - IRQ DMA1_STR4_IRQHandler - IRQ DMA1_STR5_IRQHandler - IRQ DMA1_STR6_IRQHandler - IRQ ADC1_IRQHandler - IRQ FDCAN1_IT0_IRQHandler - IRQ FDCAN2_IT0_IRQHandler - IRQ FDCAN1_IT1_IRQHandler - IRQ FDCAN2_IT1_IRQHandler - IRQ EXTI5_IRQHandler - IRQ TIM1_BRK_IRQHandler - IRQ TIM1_UP_IRQHandler - IRQ TIM1_TRG_COM_IRQHandler - IRQ TIM1_CC_IRQHandler - IRQ TIM2_IRQHandler - IRQ TIM3_IRQHandler - IRQ TIM4_IRQHandler - IRQ I2C1_EVT_IRQHandler - IRQ I2C1_ERR_IRQHandler - IRQ I2C2_EVT_IRQHandler - IRQ I2C2_ERR_IRQHandler - IRQ SPI1_IRQHandler - IRQ SPI2_IRQHandler - IRQ USART1_IRQHandler - IRQ USART2_IRQHandler - IRQ USART3_IRQHandler - IRQ EXTI10_IRQHandler - IRQ RTC_TS_IRQHandler - IRQ EXTI11_IRQHandler - IRQ TIM8_BRK_IRQHandler - IRQ TIM8_UP_IRQHandler - IRQ TIM8_TRG_COM_IRQHandler - IRQ TIM8_CC_IRQHandler - IRQ DMA1_STR7_IRQHandler - IRQ FMC_IRQHandler - IRQ SDMMC1_IRQHandler - IRQ TIM5_IRQHandler - IRQ SPI3_IRQHandler - IRQ USART4_IRQHandler - IRQ USART5_IRQHandler - IRQ TIM6_IRQHandler - IRQ TIM7_IRQHandler - IRQ DMA2_STR0_IRQHandler - IRQ DMA2_STR1_IRQHandler - IRQ DMA2_STR2_IRQHandler - IRQ DMA2_STR3_IRQHandler - IRQ DMA2_STR4_IRQHandler - IRQ ETH1_IRQHandler - IRQ ETH1_WKUP_IRQHandler - IRQ EXTI6_IRQHandler - IRQ EXTI7_IRQHandler - IRQ EXTI8_IRQHandler - IRQ EXTI9_IRQHandler - IRQ DMA2_STR5_IRQHandler - IRQ DMA2_STR6_IRQHandler - IRQ DMA2_STR7_IRQHandler - IRQ USART6_IRQHandler - IRQ I2C3_EVT_IRQHandler - IRQ I2C3_ERR_IRQHandler - IRQ EXTI12_IRQHandler - IRQ EXTI13_IRQHandler - IRQ DCMI_IRQHandler - IRQ CRYP1_IRQHandler - IRQ HASH1_IRQHandler - IRQ USART7_IRQHandler - IRQ USART8_IRQHandler - IRQ SPI4_IRQHandler - IRQ SPI5_IRQHandler - IRQ SPI6_IRQHandler - IRQ SAI1_IRQHandler - IRQ LTDC_IRQHandler - IRQ LTDC_ER_IRQHandler - IRQ ADC2_IRQHandler - IRQ SAI2_IRQHandler - IRQ QUADSPI_IRQHandler - IRQ LPTIM1_IRQHandler - IRQ CEC_IRQHandler - IRQ I2C4_EVT_IRQHandler - IRQ I2C4_ERR_IRQHandler - IRQ SPDIFRX_IRQHandler - IRQ OTG_IRQHandler - IRQ IPCC_RX0_IRQHandler - IRQ IPCC_TX0_IRQHandler - IRQ DMAMUX1_OVR_REQ_IRQHandler - IRQ IPCC_RX1_IRQHandler - IRQ IPCC_TX1_IRQHandler - IRQ CRYP2_IRQHandler - IRQ HASH2_IRQHandler - IRQ I2C5_EVT_IRQHandler - IRQ I2C5_ERR_IRQHandler - IRQ DFSDM1_FLT0_IRQHandler - IRQ DFSDM1_FLT1_IRQHandler - IRQ DFSDM1_FLT2_IRQHandler - IRQ DFSDM1_FLT3_IRQHandler - IRQ SAI3_IRQHandler - IRQ DFSDM1_FLT4_IRQHandler - IRQ TIM15_IRQHandler - IRQ TIM16_IRQHandler - IRQ TIM17_IRQHandler - IRQ TIM12_IRQHandler - IRQ MDIOS_IRQHandler - IRQ EXTI14_IRQHandler - IRQ MDMA_IRQHandler - IRQ SDMMC2_IRQHandler - IRQ HSEM_IT2_IRQHandler - IRQ DFSDM1_FLT5_IRQHandler - IRQ EXTI15_IRQHandler - IRQ TIM13_IRQHandler - IRQ TIM14_IRQHandler - IRQ DAC_IRQHandler - IRQ RNG1_IRQHandler - IRQ RNG2_IRQHandler - IRQ I2C6_EVT_IRQHandler - IRQ I2C6_ERR_IRQHandler - IRQ SDMMC3_IRQHandler - IRQ LPTIM2_IRQHandler - IRQ LPTIM3_IRQHandler - IRQ LPTIM4_IRQHandler - IRQ LPTIM5_IRQHandler - IRQ ETH1_LPI_IRQHandler - IRQ RCC_WAKEUP_IRQHandler - IRQ SAI4_IRQHandler - IRQ DTS_IRQHandler - IRQ IWDG{"code":"deadline_exceeded","msg":"operation timed out"}