ESP32 compile fixes
This commit is contained in:
parent
7a9ccc651b
commit
22171d8301
4 changed files with 12 additions and 1 deletions
|
@ -102,7 +102,7 @@ void console_esp32::panel_update_thread()
|
|||
int run_mode = current_PSW >> 14;
|
||||
|
||||
uint16_t current_PC = c->getPC();
|
||||
uint32_t full_addr = b->calculate_physical_address(run_mode, current_PC, false, false);
|
||||
uint32_t full_addr = b->calculate_physical_address(run_mode, current_PC, false, false, true);
|
||||
|
||||
uint16_t current_instr = b->readWord(current_PC);
|
||||
|
||||
|
|
1
ESP32/log.cpp
Symbolic link
1
ESP32/log.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../log.cpp
|
1
ESP32/log.h
Symbolic link
1
ESP32/log.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../log.h
|
9
log.cpp
9
log.cpp
|
@ -16,6 +16,13 @@ static FILE *lfh = nullptr;
|
|||
static int lf_uid = -1;
|
||||
static int lf_gid = -1;
|
||||
|
||||
#if defined(ESP32)
|
||||
int gettid()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void setlog(const char *lf, const log_level_t ll_file, const log_level_t ll_screen)
|
||||
{
|
||||
if (lfh)
|
||||
|
@ -52,11 +59,13 @@ void dolog(const log_level_t ll, const char *fmt, ...)
|
|||
if (!lfh)
|
||||
error_exit(true, "Cannot access log-file %s", logfile);
|
||||
|
||||
#if !defined(ESP32)
|
||||
if (lf_uid != -1 && fchown(fileno(lfh), lf_uid, lf_gid) == -1)
|
||||
error_exit(true, "Cannot change logfile (%s) ownership", logfile);
|
||||
|
||||
if (fcntl(fileno(lfh), F_SETFD, FD_CLOEXEC) == -1)
|
||||
error_exit(true, "fcntl(FD_CLOEXEC) failed");
|
||||
#endif
|
||||
}
|
||||
|
||||
uint64_t now = get_us();
|
||||
|
|
Loading…
Add table
Reference in a new issue