Skip to content

How to compile on Ubuntu? #16

@codeaholics

Description

@codeaholics

I'm trying to compile on Ubuntu 20.04.5 LTS (Focal Fossa), kernel version 5.4.0-139-generic, and I'm getting the following error:

$ make
make -C /lib/modules/5.4.0-139-generic/build M=/tmp/ttyebus modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-139-generic'
  CC [M]  /tmp/ttyebus/ttyebusm.o
/tmp/ttyebus/ttyebusm.c: Assembler messages:
/tmp/ttyebus/ttyebusm.c:264: Error: expecting operand after ','; got nothing
/tmp/ttyebus/ttyebusm.c:264: Error: expecting operand after ','; got nothing
make[2]: *** [scripts/Makefile.build:270: /tmp/ttyebus/ttyebusm.o] Error 1
make[1]: *** [Makefile:1767: /tmp/ttyebus] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-139-generic'
make: *** [Makefile:24: all] Error 2

Line 264 is the asm statement here:

// ===============================================================================================
//
//                                    delay
//
// ===============================================================================================
static inline void delay(int32_t count)
    {
        asm volatile("__delay_%=: subs %[count], %[count], #1; bne __delay_%=\n"
            : "=r"(count): [count]"0"(count) : "cc");
    }

I'm not really a C programmer so I'm out of my depth here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions