Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to compile on Ubuntu? #16

Open
codeaholics opened this issue Mar 13, 2023 · 0 comments
Open

How to compile on Ubuntu? #16

codeaholics opened this issue Mar 13, 2023 · 0 comments

Comments

@codeaholics
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant